Class: AWSCDK::DynamoDB::TableProps
- Inherits:
-
TableOptions
- Object
- TableOptions
- AWSCDK::DynamoDB::TableProps
- Defined in:
- dynamo_db/table_props.rb
Overview
Properties for a DynamoDB Table.
Instance Attribute Summary collapse
-
#billing_mode ⇒ AWSCDK::DynamoDB::BillingMode?
readonly
Specify how you are charged for read and write throughput and how you manage capacity.
-
#contributor_insights_enabled ⇒ Boolean?
readonly
deprecated
Deprecated.
use `contributorInsightsSpecification instead
-
#contributor_insights_specification ⇒ AWSCDK::DynamoDB::ContributorInsightsSpecification?
readonly
Whether CloudWatch contributor insights is enabled and what mode is selected.
-
#deletion_protection ⇒ Boolean?
readonly
Enables deletion protection for the table.
-
#encryption ⇒ AWSCDK::DynamoDB::TableEncryption?
readonly
Whether server-side encryption with an AWS managed customer master key is enabled.
-
#encryption_key ⇒ AWSCDK::KMS::IKey?
readonly
External KMS key to use for table encryption.
-
#import_source ⇒ AWSCDK::DynamoDB::ImportSourceSpecification?
readonly
The properties of data being imported from the S3 bucket source to the table.
-
#kinesis_precision_timestamp ⇒ AWSCDK::DynamoDB::ApproximateCreationDateTimePrecision?
readonly
Kinesis Data Stream approximate creation timestamp precision.
-
#kinesis_stream ⇒ AWSCDK::Kinesis::IStream?
readonly
Kinesis Data Stream to capture item-level changes for the table.
-
#max_read_request_units ⇒ Numeric?
readonly
The maximum read request units for the table.
-
#max_write_request_units ⇒ Numeric?
readonly
The write request units for the table.
-
#partition_key ⇒ AWSCDK::DynamoDB::Attribute?
readonly
Partition key attribute definition.
-
#point_in_time_recovery ⇒ Boolean?
readonly
deprecated
Deprecated.
use
pointInTimeRecoverySpecificationinstead -
#point_in_time_recovery_specification ⇒ AWSCDK::DynamoDB::PointInTimeRecoverySpecification?
readonly
Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.
-
#read_capacity ⇒ Numeric?
readonly
The read capacity for the table.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
The removal policy to apply to the DynamoDB Table.
-
#replica_removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
The removal policy to apply to the DynamoDB replica tables.
-
#replication_regions ⇒ Array<String>?
readonly
Regions where replica tables will be created.
-
#replication_timeout ⇒ AWSCDK::Duration?
readonly
The timeout for a table replication operation in a single region.
-
#resource_policy ⇒ AWSCDK::IAM::PolicyDocument?
readonly
Resource policy to assign to table.
-
#sort_key ⇒ AWSCDK::DynamoDB::Attribute?
readonly
Sort key attribute definition.
-
#stream ⇒ AWSCDK::DynamoDB::StreamViewType?
readonly
When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.
-
#table_class ⇒ AWSCDK::DynamoDB::TableClass?
readonly
Specify the table class.
-
#table_name ⇒ String?
readonly
Enforces a particular physical table name.
-
#time_to_live_attribute ⇒ String?
readonly
The name of TTL attribute.
-
#wait_for_replication_to_finish ⇒ Boolean?
readonly
[WARNING: Use this flag with caution, misusing this flag may cause deleting existing replicas, refer to the detailed documentation for more information] Indicates whether CloudFormation stack waits for replication to finish.
-
#warm_throughput ⇒ AWSCDK::DynamoDB::WarmThroughput?
readonly
Specify values to pre-warm you DynamoDB Table Warm Throughput feature is not available for Global Table replicas using the
Tableconstruct. -
#write_capacity ⇒ Numeric?
readonly
The write capacity for the table.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(partition_key: nil, sort_key: nil, billing_mode: nil, contributor_insights_enabled: nil, contributor_insights_specification: nil, deletion_protection: nil, encryption: nil, encryption_key: nil, import_source: nil, max_read_request_units: nil, max_write_request_units: nil, point_in_time_recovery: nil, point_in_time_recovery_specification: nil, read_capacity: nil, removal_policy: nil, replica_removal_policy: nil, replication_regions: nil, replication_timeout: nil, resource_policy: nil, stream: nil, table_class: nil, time_to_live_attribute: nil, wait_for_replication_to_finish: nil, warm_throughput: nil, write_capacity: nil, kinesis_precision_timestamp: nil, kinesis_stream: nil, table_name: nil) ⇒ TableProps
constructor
A new instance of TableProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(partition_key: nil, sort_key: nil, billing_mode: nil, contributor_insights_enabled: nil, contributor_insights_specification: nil, deletion_protection: nil, encryption: nil, encryption_key: nil, import_source: nil, max_read_request_units: nil, max_write_request_units: nil, point_in_time_recovery: nil, point_in_time_recovery_specification: nil, read_capacity: nil, removal_policy: nil, replica_removal_policy: nil, replication_regions: nil, replication_timeout: nil, resource_policy: nil, stream: nil, table_class: nil, time_to_live_attribute: nil, wait_for_replication_to_finish: nil, warm_throughput: nil, write_capacity: nil, kinesis_precision_timestamp: nil, kinesis_stream: nil, table_name: nil) ⇒ TableProps
Returns a new instance of TableProps.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'dynamo_db/table_props.rb', line 35 def initialize(partition_key: nil, sort_key: nil, billing_mode: nil, contributor_insights_enabled: nil, contributor_insights_specification: nil, deletion_protection: nil, encryption: nil, encryption_key: nil, import_source: nil, max_read_request_units: nil, max_write_request_units: nil, point_in_time_recovery: nil, point_in_time_recovery_specification: nil, read_capacity: nil, removal_policy: nil, replica_removal_policy: nil, replication_regions: nil, replication_timeout: nil, resource_policy: nil, stream: nil, table_class: nil, time_to_live_attribute: nil, wait_for_replication_to_finish: nil, warm_throughput: nil, write_capacity: nil, kinesis_precision_timestamp: nil, kinesis_stream: nil, table_name: nil) @partition_key = partition_key.is_a?(Hash) ? ::AWSCDK::DynamoDB::Attribute.new(**partition_key.transform_keys(&:to_sym)) : partition_key Jsii::Type.check_type(@partition_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuQXR0cmlidXRlIn0=")), "partitionKey") unless @partition_key.nil? @sort_key = sort_key.is_a?(Hash) ? ::AWSCDK::DynamoDB::Attribute.new(**sort_key.transform_keys(&:to_sym)) : sort_key Jsii::Type.check_type(@sort_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuQXR0cmlidXRlIn0=")), "sortKey") unless @sort_key.nil? @billing_mode = billing_mode Jsii::Type.check_type(@billing_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuQmlsbGluZ01vZGUifQ==")), "billingMode") unless @billing_mode.nil? @contributor_insights_enabled = contributor_insights_enabled Jsii::Type.check_type(@contributor_insights_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "contributorInsightsEnabled") unless @contributor_insights_enabled.nil? @contributor_insights_specification = contributor_insights_specification.is_a?(Hash) ? ::AWSCDK::DynamoDB::ContributorInsightsSpecification.new(**contributor_insights_specification.transform_keys(&:to_sym)) : contributor_insights_specification Jsii::Type.check_type(@contributor_insights_specification, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuQ29udHJpYnV0b3JJbnNpZ2h0c1NwZWNpZmljYXRpb24ifQ==")), "contributorInsightsSpecification") unless @contributor_insights_specification.nil? @deletion_protection = deletion_protection Jsii::Type.check_type(@deletion_protection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deletionProtection") unless @deletion_protection.nil? @encryption = encryption Jsii::Type.check_type(@encryption, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuVGFibGVFbmNyeXB0aW9uIn0=")), "encryption") unless @encryption.nil? @encryption_key = encryption_key Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "encryptionKey") unless @encryption_key.nil? @import_source = import_source.is_a?(Hash) ? ::AWSCDK::DynamoDB::ImportSourceSpecification.new(**import_source.transform_keys(&:to_sym)) : import_source Jsii::Type.check_type(@import_source, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuSW1wb3J0U291cmNlU3BlY2lmaWNhdGlvbiJ9")), "importSource") unless @import_source.nil? @max_read_request_units = max_read_request_units Jsii::Type.check_type(@max_read_request_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxReadRequestUnits") unless @max_read_request_units.nil? @max_write_request_units = max_write_request_units Jsii::Type.check_type(@max_write_request_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxWriteRequestUnits") unless @max_write_request_units.nil? @point_in_time_recovery = point_in_time_recovery Jsii::Type.check_type(@point_in_time_recovery, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "pointInTimeRecovery") unless @point_in_time_recovery.nil? @point_in_time_recovery_specification = point_in_time_recovery_specification.is_a?(Hash) ? ::AWSCDK::DynamoDB::PointInTimeRecoverySpecification.new(**point_in_time_recovery_specification.transform_keys(&:to_sym)) : point_in_time_recovery_specification Jsii::Type.check_type(@point_in_time_recovery_specification, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuUG9pbnRJblRpbWVSZWNvdmVyeVNwZWNpZmljYXRpb24ifQ==")), "pointInTimeRecoverySpecification") unless @point_in_time_recovery_specification.nil? @read_capacity = read_capacity Jsii::Type.check_type(@read_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "readCapacity") unless @read_capacity.nil? @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? @replica_removal_policy = replica_removal_policy Jsii::Type.check_type(@replica_removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "replicaRemovalPolicy") unless @replica_removal_policy.nil? @replication_regions = replication_regions Jsii::Type.check_type(@replication_regions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "replicationRegions") unless @replication_regions.nil? @replication_timeout = replication_timeout Jsii::Type.check_type(@replication_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "replicationTimeout") unless @replication_timeout.nil? @resource_policy = resource_policy Jsii::Type.check_type(@resource_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeURvY3VtZW50In0=")), "resourcePolicy") unless @resource_policy.nil? @stream = stream Jsii::Type.check_type(@stream, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuU3RyZWFtVmlld1R5cGUifQ==")), "stream") unless @stream.nil? @table_class = table_class Jsii::Type.check_type(@table_class, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuVGFibGVDbGFzcyJ9")), "tableClass") unless @table_class.nil? @time_to_live_attribute = time_to_live_attribute Jsii::Type.check_type(@time_to_live_attribute, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timeToLiveAttribute") unless @time_to_live_attribute.nil? @wait_for_replication_to_finish = wait_for_replication_to_finish Jsii::Type.check_type(@wait_for_replication_to_finish, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "waitForReplicationToFinish") unless @wait_for_replication_to_finish.nil? @warm_throughput = warm_throughput.is_a?(Hash) ? ::AWSCDK::DynamoDB::WarmThroughput.new(**warm_throughput.transform_keys(&:to_sym)) : warm_throughput Jsii::Type.check_type(@warm_throughput, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuV2FybVRocm91Z2hwdXQifQ==")), "warmThroughput") unless @warm_throughput.nil? @write_capacity = write_capacity Jsii::Type.check_type(@write_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "writeCapacity") unless @write_capacity.nil? @kinesis_precision_timestamp = Jsii::Type.check_type(@kinesis_precision_timestamp, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuQXBwcm94aW1hdGVDcmVhdGlvbkRhdGVUaW1lUHJlY2lzaW9uIn0=")), "kinesisPrecisionTimestamp") unless @kinesis_precision_timestamp.nil? @kinesis_stream = kinesis_stream Jsii::Type.check_type(@kinesis_stream, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpcy5JU3RyZWFtIn0=")), "kinesisStream") unless @kinesis_stream.nil? @table_name = table_name Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName") unless @table_name.nil? end |
Instance Attribute Details
#billing_mode ⇒ AWSCDK::DynamoDB::BillingMode? (readonly)
Default: PROVISIONED if replicationRegions is not specified, PAY_PER_REQUEST otherwise
Specify how you are charged for read and write throughput and how you manage capacity.
116 117 118 |
# File 'dynamo_db/table_props.rb', line 116 def billing_mode @billing_mode end |
#contributor_insights_enabled ⇒ Boolean? (readonly)
use `contributorInsightsSpecification instead
Default: false
Whether CloudWatch contributor insights is enabled.
122 123 124 |
# File 'dynamo_db/table_props.rb', line 122 def contributor_insights_enabled @contributor_insights_enabled end |
#contributor_insights_specification ⇒ AWSCDK::DynamoDB::ContributorInsightsSpecification? (readonly)
Default: - contributor insights is not enabled
Whether CloudWatch contributor insights is enabled and what mode is selected.
127 128 129 |
# File 'dynamo_db/table_props.rb', line 127 def contributor_insights_specification @contributor_insights_specification end |
#deletion_protection ⇒ Boolean? (readonly)
Default: false
Enables deletion protection for the table.
132 133 134 |
# File 'dynamo_db/table_props.rb', line 132 def deletion_protection @deletion_protection end |
#encryption ⇒ AWSCDK::DynamoDB::TableEncryption? (readonly)
Default: - The table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.
Whether server-side encryption with an AWS managed customer master key is enabled.
This property cannot be set if server_side_encryption is set.
NOTE: if you set this to
CUSTOMER_MANAGEDandencryption_keyis not specified, the key that the Tablet generates for you will be created with default permissions. If you are using CDKv2, these permissions will be sufficient to enable the key for use with DynamoDB tables. If you are using CDKv1, make sure the feature flag@aws-cdk/aws-kms:defaultKeyPoliciesis set totruein yourcdk.json.
146 147 148 |
# File 'dynamo_db/table_props.rb', line 146 def encryption @encryption end |
#encryption_key ⇒ AWSCDK::KMS::IKey? (readonly)
Default: - If encryption is set to TableEncryption.CUSTOMER_MANAGED and this property is undefined, a new KMS key will be created and associated with this table. If encryption and this property are both undefined, then the table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.
External KMS key to use for table encryption.
This property can only be set if encryption is set to TableEncryption.CUSTOMER_MANAGED.
153 154 155 |
# File 'dynamo_db/table_props.rb', line 153 def encryption_key @encryption_key end |
#import_source ⇒ AWSCDK::DynamoDB::ImportSourceSpecification? (readonly)
Default: - no data import from the S3 bucket
The properties of data being imported from the S3 bucket source to the table.
158 159 160 |
# File 'dynamo_db/table_props.rb', line 158 def import_source @import_source end |
#kinesis_precision_timestamp ⇒ AWSCDK::DynamoDB::ApproximateCreationDateTimePrecision? (readonly)
Default: ApproximateCreationDateTimePrecision.MICROSECOND
Kinesis Data Stream approximate creation timestamp precision.
285 286 287 |
# File 'dynamo_db/table_props.rb', line 285 def @kinesis_precision_timestamp end |
#kinesis_stream ⇒ AWSCDK::Kinesis::IStream? (readonly)
Default: - no Kinesis Data Stream
Kinesis Data Stream to capture item-level changes for the table.
290 291 292 |
# File 'dynamo_db/table_props.rb', line 290 def kinesis_stream @kinesis_stream end |
#max_read_request_units ⇒ Numeric? (readonly)
Default: - on-demand throughput is disabled
The maximum read request units for the table.
Careful if you add Global Secondary Indexes, as those will share the table's maximum on-demand throughput.
Can only be provided if billingMode is PAY_PER_REQUEST.
168 169 170 |
# File 'dynamo_db/table_props.rb', line 168 def max_read_request_units @max_read_request_units end |
#max_write_request_units ⇒ Numeric? (readonly)
Default: - on-demand throughput is disabled
The write request units for the table.
Careful if you add Global Secondary Indexes, as those will share the table's maximum on-demand throughput.
Can only be provided if billingMode is PAY_PER_REQUEST.
178 179 180 |
# File 'dynamo_db/table_props.rb', line 178 def max_write_request_units @max_write_request_units end |
#partition_key ⇒ AWSCDK::DynamoDB::Attribute? (readonly)
Default: - exactly one of partitionKey and partitionKeys must be specified.
Partition key attribute definition.
If a single field forms the partition key, you can use this field. Use the
partition_keys field if the partition key is a multi-attribute key (consists of
multiple fields).
102 103 104 |
# File 'dynamo_db/table_props.rb', line 102 def partition_key @partition_key end |
#point_in_time_recovery ⇒ Boolean? (readonly)
use pointInTimeRecoverySpecification instead
Default: false - point in time recovery is not enabled.
Whether point-in-time recovery is enabled.
184 185 186 |
# File 'dynamo_db/table_props.rb', line 184 def point_in_time_recovery @point_in_time_recovery end |
#point_in_time_recovery_specification ⇒ AWSCDK::DynamoDB::PointInTimeRecoverySpecification? (readonly)
Default: - point in time recovery is not enabled.
Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.
189 190 191 |
# File 'dynamo_db/table_props.rb', line 189 def point_in_time_recovery_specification @point_in_time_recovery_specification end |
#read_capacity ⇒ Numeric? (readonly)
Default: 5
The read capacity for the table.
Careful if you add Global Secondary Indexes, as those will share the table's provisioned throughput.
Can only be provided if billingMode is Provisioned.
199 200 201 |
# File 'dynamo_db/table_props.rb', line 199 def read_capacity @read_capacity end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Default: RemovalPolicy.RETAIN
The removal policy to apply to the DynamoDB Table.
204 205 206 |
# File 'dynamo_db/table_props.rb', line 204 def removal_policy @removal_policy end |
#replica_removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Default: undefined - use DynamoDB Table's removal policy
The removal policy to apply to the DynamoDB replica tables.
209 210 211 |
# File 'dynamo_db/table_props.rb', line 209 def replica_removal_policy @replica_removal_policy end |
#replication_regions ⇒ Array<String>? (readonly)
Default: - no replica tables are created
Regions where replica tables will be created.
214 215 216 |
# File 'dynamo_db/table_props.rb', line 214 def replication_regions @replication_regions end |
#replication_timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.minutes(30)
The timeout for a table replication operation in a single region.
219 220 221 |
# File 'dynamo_db/table_props.rb', line 219 def replication_timeout @replication_timeout end |
#resource_policy ⇒ AWSCDK::IAM::PolicyDocument? (readonly)
Default: - No resource policy statement
Resource policy to assign to table.
225 226 227 |
# File 'dynamo_db/table_props.rb', line 225 def resource_policy @resource_policy end |
#sort_key ⇒ AWSCDK::DynamoDB::Attribute? (readonly)
Default: - no sort key
Sort key attribute definition.
If a single field forms the sort key, you can use this field. Use the
sort_keys field if the sort key is a multi-attribute key (consists of multiple
fields).
111 112 113 |
# File 'dynamo_db/table_props.rb', line 111 def sort_key @sort_key end |
#stream ⇒ AWSCDK::DynamoDB::StreamViewType? (readonly)
Default: - streams are disabled unless replicationRegions is specified
When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.
230 231 232 |
# File 'dynamo_db/table_props.rb', line 230 def stream @stream end |
#table_class ⇒ AWSCDK::DynamoDB::TableClass? (readonly)
Default: STANDARD
Specify the table class.
235 236 237 |
# File 'dynamo_db/table_props.rb', line 235 def table_class @table_class end |
#table_name ⇒ String? (readonly)
Default:
Enforces a particular physical table name.
295 296 297 |
# File 'dynamo_db/table_props.rb', line 295 def table_name @table_name end |
#time_to_live_attribute ⇒ String? (readonly)
Default: - TTL is disabled
The name of TTL attribute.
240 241 242 |
# File 'dynamo_db/table_props.rb', line 240 def time_to_live_attribute @time_to_live_attribute end |
#wait_for_replication_to_finish ⇒ Boolean? (readonly)
Default: true
[WARNING: Use this flag with caution, misusing this flag may cause deleting existing replicas, refer to the detailed documentation for more information] Indicates whether CloudFormation stack waits for replication to finish.
If set to false, the CloudFormation resource will mark the resource as created and replication will be completed asynchronously. This property is ignored if replicationRegions property is not set.
WARNING: DO NOT UNSET this property if adding/removing multiple replicationRegions in one deployment, as CloudFormation only supports one region replication at a time. CDK overcomes this limitation by waiting for replication to finish before starting new replicationRegion.
If the custom resource which handles replication has a physical resource
ID with the format region instead of tablename-region (this would happen
if the custom resource hasn't received an event since v1.91.0), DO NOT SET
this property to false without making a change to the table name.
This will cause the existing replicas to be deleted.
262 263 264 |
# File 'dynamo_db/table_props.rb', line 262 def wait_for_replication_to_finish @wait_for_replication_to_finish end |
#warm_throughput ⇒ AWSCDK::DynamoDB::WarmThroughput? (readonly)
Default: - warm throughput is not configured
Specify values to pre-warm you DynamoDB Table Warm Throughput feature is not available for Global Table replicas using the Table construct.
To enable Warm Throughput, use the TableV2 construct instead.
270 271 272 |
# File 'dynamo_db/table_props.rb', line 270 def warm_throughput @warm_throughput end |
#write_capacity ⇒ Numeric? (readonly)
Default: 5
The write capacity for the table.
Careful if you add Global Secondary Indexes, as those will share the table's provisioned throughput.
Can only be provided if billingMode is Provisioned.
280 281 282 |
# File 'dynamo_db/table_props.rb', line 280 def write_capacity @write_capacity end |
Class Method Details
.jsii_properties ⇒ Object
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'dynamo_db/table_props.rb', line 297 def self.jsii_properties { :partition_key => "partitionKey", :sort_key => "sortKey", :billing_mode => "billingMode", :contributor_insights_enabled => "contributorInsightsEnabled", :contributor_insights_specification => "contributorInsightsSpecification", :deletion_protection => "deletionProtection", :encryption => "encryption", :encryption_key => "encryptionKey", :import_source => "importSource", :max_read_request_units => "maxReadRequestUnits", :max_write_request_units => "maxWriteRequestUnits", :point_in_time_recovery => "pointInTimeRecovery", :point_in_time_recovery_specification => "pointInTimeRecoverySpecification", :read_capacity => "readCapacity", :removal_policy => "removalPolicy", :replica_removal_policy => "replicaRemovalPolicy", :replication_regions => "replicationRegions", :replication_timeout => "replicationTimeout", :resource_policy => "resourcePolicy", :stream => "stream", :table_class => "tableClass", :time_to_live_attribute => "timeToLiveAttribute", :wait_for_replication_to_finish => "waitForReplicationToFinish", :warm_throughput => "warmThroughput", :write_capacity => "writeCapacity", :kinesis_precision_timestamp => "kinesisPrecisionTimestamp", :kinesis_stream => "kinesisStream", :table_name => "tableName", } end |
Instance Method Details
#to_jsii ⇒ Object
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'dynamo_db/table_props.rb', line 330 def to_jsii result = {} result.merge!(super) result.merge!({ "partitionKey" => @partition_key, "sortKey" => @sort_key, "billingMode" => @billing_mode, "contributorInsightsEnabled" => @contributor_insights_enabled, "contributorInsightsSpecification" => @contributor_insights_specification, "deletionProtection" => @deletion_protection, "encryption" => @encryption, "encryptionKey" => @encryption_key, "importSource" => @import_source, "maxReadRequestUnits" => @max_read_request_units, "maxWriteRequestUnits" => @max_write_request_units, "pointInTimeRecovery" => @point_in_time_recovery, "pointInTimeRecoverySpecification" => @point_in_time_recovery_specification, "readCapacity" => @read_capacity, "removalPolicy" => @removal_policy, "replicaRemovalPolicy" => @replica_removal_policy, "replicationRegions" => @replication_regions, "replicationTimeout" => @replication_timeout, "resourcePolicy" => @resource_policy, "stream" => @stream, "tableClass" => @table_class, "timeToLiveAttribute" => @time_to_live_attribute, "waitForReplicationToFinish" => @wait_for_replication_to_finish, "warmThroughput" => @warm_throughput, "writeCapacity" => @write_capacity, "kinesisPrecisionTimestamp" => @kinesis_precision_timestamp, "kinesisStream" => @kinesis_stream, "tableName" => @table_name, }) result.compact end |