Class: AWSCDK::DynamoDB::TableProps

Inherits:
TableOptions
  • Object
show all
Defined in:
dynamo_db/table_props.rb

Overview

Properties for a DynamoDB Table.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • partition_key (AWSCDK::DynamoDB::Attribute, nil) (defaults to: nil)

    Partition key attribute definition.

  • sort_key (AWSCDK::DynamoDB::Attribute, nil) (defaults to: nil)

    Sort key attribute definition.

  • billing_mode (AWSCDK::DynamoDB::BillingMode, nil) (defaults to: nil)

    Specify how you are charged for read and write throughput and how you manage capacity.

  • contributor_insights_enabled (Boolean, nil) (defaults to: nil)

    Whether CloudWatch contributor insights is enabled.

  • contributor_insights_specification (AWSCDK::DynamoDB::ContributorInsightsSpecification, nil) (defaults to: nil)

    Whether CloudWatch contributor insights is enabled and what mode is selected.

  • deletion_protection (Boolean, nil) (defaults to: nil)

    Enables deletion protection for the table.

  • encryption (AWSCDK::DynamoDB::TableEncryption, nil) (defaults to: nil)

    Whether server-side encryption with an AWS managed customer master key is enabled.

  • encryption_key (AWSCDK::KMS::IKey, nil) (defaults to: nil)

    External KMS key to use for table encryption.

  • import_source (AWSCDK::DynamoDB::ImportSourceSpecification, nil) (defaults to: nil)

    The properties of data being imported from the S3 bucket source to the table.

  • max_read_request_units (Numeric, nil) (defaults to: nil)

    The maximum read request units for the table.

  • max_write_request_units (Numeric, nil) (defaults to: nil)

    The write request units for the table.

  • point_in_time_recovery (Boolean, nil) (defaults to: nil)

    Whether point-in-time recovery is enabled.

  • point_in_time_recovery_specification (AWSCDK::DynamoDB::PointInTimeRecoverySpecification, nil) (defaults to: nil)

    Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.

  • read_capacity (Numeric, nil) (defaults to: nil)

    The read capacity for the table.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    The removal policy to apply to the DynamoDB Table.

  • replica_removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    The removal policy to apply to the DynamoDB replica tables.

  • replication_regions (Array<String>, nil) (defaults to: nil)

    Regions where replica tables will be created.

  • replication_timeout (AWSCDK::Duration, nil) (defaults to: nil)

    The timeout for a table replication operation in a single region.

  • resource_policy (AWSCDK::IAM::PolicyDocument, nil) (defaults to: nil)

    Resource policy to assign to table.

  • stream (AWSCDK::DynamoDB::StreamViewType, nil) (defaults to: nil)

    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, nil) (defaults to: nil)

    Specify the table class.

  • time_to_live_attribute (String, nil) (defaults to: nil)

    The name of TTL attribute.

  • wait_for_replication_to_finish (Boolean, nil) (defaults to: nil)

    [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, nil) (defaults to: nil)

    Specify values to pre-warm you DynamoDB Table Warm Throughput feature is not available for Global Table replicas using the Table construct.

  • write_capacity (Numeric, nil) (defaults to: nil)

    The write capacity for the table.

  • kinesis_precision_timestamp (AWSCDK::DynamoDB::ApproximateCreationDateTimePrecision, nil) (defaults to: nil)

    Kinesis Data Stream approximate creation timestamp precision.

  • kinesis_stream (AWSCDK::Kinesis::IStream, nil) (defaults to: nil)

    Kinesis Data Stream to capture item-level changes for the table.

  • table_name (String, nil) (defaults to: nil)

    Enforces a particular physical table name.



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 = 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_modeAWSCDK::DynamoDB::BillingMode? (readonly)

Note:

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_enabledBoolean? (readonly)

Deprecated.

use `contributorInsightsSpecification instead

Note:

Default: false

Whether CloudWatch contributor insights is enabled.

Returns:

  • (Boolean, nil)


122
123
124
# File 'dynamo_db/table_props.rb', line 122

def contributor_insights_enabled
  @contributor_insights_enabled
end

#contributor_insights_specificationAWSCDK::DynamoDB::ContributorInsightsSpecification? (readonly)

Note:

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_protectionBoolean? (readonly)

Note:

Default: false

Enables deletion protection for the table.

Returns:

  • (Boolean, nil)


132
133
134
# File 'dynamo_db/table_props.rb', line 132

def deletion_protection
  @deletion_protection
end

#encryptionAWSCDK::DynamoDB::TableEncryption? (readonly)

Note:

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_MANAGED and encryption_key is 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:defaultKeyPolicies is set to true in your cdk.json.



146
147
148
# File 'dynamo_db/table_props.rb', line 146

def encryption
  @encryption
end

#encryption_keyAWSCDK::KMS::IKey? (readonly)

Note:

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.

Returns:



153
154
155
# File 'dynamo_db/table_props.rb', line 153

def encryption_key
  @encryption_key
end

#import_sourceAWSCDK::DynamoDB::ImportSourceSpecification? (readonly)

Note:

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_timestampAWSCDK::DynamoDB::ApproximateCreationDateTimePrecision? (readonly)

Note:

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
  @kinesis_precision_timestamp
end

#kinesis_streamAWSCDK::Kinesis::IStream? (readonly)

Note:

Default: - no Kinesis Data Stream

Kinesis Data Stream to capture item-level changes for the table.

Returns:



290
291
292
# File 'dynamo_db/table_props.rb', line 290

def kinesis_stream
  @kinesis_stream
end

#max_read_request_unitsNumeric? (readonly)

Note:

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.

Returns:

  • (Numeric, nil)


168
169
170
# File 'dynamo_db/table_props.rb', line 168

def max_read_request_units
  @max_read_request_units
end

#max_write_request_unitsNumeric? (readonly)

Note:

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.

Returns:

  • (Numeric, nil)


178
179
180
# File 'dynamo_db/table_props.rb', line 178

def max_write_request_units
  @max_write_request_units
end

#partition_keyAWSCDK::DynamoDB::Attribute? (readonly)

Note:

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).

Returns:



102
103
104
# File 'dynamo_db/table_props.rb', line 102

def partition_key
  @partition_key
end

#point_in_time_recoveryBoolean? (readonly)

Deprecated.

use pointInTimeRecoverySpecification instead

Note:

Default: false - point in time recovery is not enabled.

Whether point-in-time recovery is enabled.

Returns:

  • (Boolean, nil)


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_specificationAWSCDK::DynamoDB::PointInTimeRecoverySpecification? (readonly)

Note:

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_capacityNumeric? (readonly)

Note:

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.

Returns:

  • (Numeric, nil)


199
200
201
# File 'dynamo_db/table_props.rb', line 199

def read_capacity
  @read_capacity
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: RemovalPolicy.RETAIN

The removal policy to apply to the DynamoDB Table.

Returns:



204
205
206
# File 'dynamo_db/table_props.rb', line 204

def removal_policy
  @removal_policy
end

#replica_removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: undefined - use DynamoDB Table's removal policy

The removal policy to apply to the DynamoDB replica tables.

Returns:



209
210
211
# File 'dynamo_db/table_props.rb', line 209

def replica_removal_policy
  @replica_removal_policy
end

#replication_regionsArray<String>? (readonly)

Note:

Default: - no replica tables are created

Regions where replica tables will be created.

Returns:

  • (Array<String>, nil)


214
215
216
# File 'dynamo_db/table_props.rb', line 214

def replication_regions
  @replication_regions
end

#replication_timeoutAWSCDK::Duration? (readonly)

Note:

Default: Duration.minutes(30)

The timeout for a table replication operation in a single region.

Returns:



219
220
221
# File 'dynamo_db/table_props.rb', line 219

def replication_timeout
  @replication_timeout
end

#resource_policyAWSCDK::IAM::PolicyDocument? (readonly)

Note:

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_keyAWSCDK::DynamoDB::Attribute? (readonly)

Note:

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).

Returns:



111
112
113
# File 'dynamo_db/table_props.rb', line 111

def sort_key
  @sort_key
end

#streamAWSCDK::DynamoDB::StreamViewType? (readonly)

Note:

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_classAWSCDK::DynamoDB::TableClass? (readonly)

Note:

Default: STANDARD

Specify the table class.



235
236
237
# File 'dynamo_db/table_props.rb', line 235

def table_class
  @table_class
end

#table_nameString? (readonly)

Note:

Default:

Enforces a particular physical table name.

Returns:

  • (String, nil)


295
296
297
# File 'dynamo_db/table_props.rb', line 295

def table_name
  @table_name
end

#time_to_live_attributeString? (readonly)

Note:

Default: - TTL is disabled

The name of TTL attribute.

Returns:

  • (String, nil)


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_finishBoolean? (readonly)

Note:

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_throughputAWSCDK::DynamoDB::WarmThroughput? (readonly)

Note:

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_capacityNumeric? (readonly)

Note:

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.

Returns:

  • (Numeric, nil)


280
281
282
# File 'dynamo_db/table_props.rb', line 280

def write_capacity
  @write_capacity
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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