Class TableV2.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<TableV2>
- Enclosing class:
TableV2
TableV2
.-
Method Summary
Modifier and TypeMethodDescriptionThe billing mode and capacity settings to apply to the table.build()
contributorInsights
(Boolean contributorInsights) Whether CloudWatch contributor insights is enabled.static TableV2.Builder
deletionProtection
(Boolean deletionProtection) Whether deletion protection is enabled.dynamoStream
(StreamViewType dynamoStream) When an item in the table is modified, StreamViewType determines what information is written to the stream.encryption
(TableEncryptionV2 encryption) The server-side encryption.globalSecondaryIndexes
(List<? extends GlobalSecondaryIndexPropsV2> globalSecondaryIndexes) Global secondary indexes.kinesisStream
(IStream kinesisStream) Kinesis Data Stream to capture item level changes.localSecondaryIndexes
(List<? extends LocalSecondaryIndexProps> localSecondaryIndexes) Local secondary indexes.partitionKey
(Attribute partitionKey) Partition key attribute definition.pointInTimeRecovery
(Boolean pointInTimeRecovery) Whether point-in-time recovery is enabled.removalPolicy
(RemovalPolicy removalPolicy) The removal policy applied to the table.replicas
(List<? extends ReplicaTableProps> replicas) Replica tables to deploy with the primary table.resourcePolicy
(PolicyDocument resourcePolicy) Resource policy to assign to DynamoDB Table.Sort key attribute definition.tableClass
(TableClass tableClass) The table class.The name of the table.Tags to be applied to the primary table (default replica table).timeToLiveAttribute
(String timeToLiveAttribute) The name of the TTL attribute.warmThroughput
(WarmThroughput warmThroughput) The warm throughput configuration for the table.
-
Method Details
-
create
@Stability(Stable) public static TableV2.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
TableV2.Builder
.
-
contributorInsights
Whether CloudWatch contributor insights is enabled.Default: false
- Parameters:
contributorInsights
- Whether CloudWatch contributor insights is enabled. This parameter is required.- Returns:
this
-
deletionProtection
Whether deletion protection is enabled.Default: false
- Parameters:
deletionProtection
- Whether deletion protection is enabled. This parameter is required.- Returns:
this
-
kinesisStream
Kinesis Data Stream to capture item level changes.Default: - no Kinesis Data Stream
- Parameters:
kinesisStream
- Kinesis Data Stream to capture item level changes. This parameter is required.- Returns:
this
-
pointInTimeRecovery
Whether point-in-time recovery is enabled.Default: false
- Parameters:
pointInTimeRecovery
- Whether point-in-time recovery is enabled. This parameter is required.- Returns:
this
-
resourcePolicy
Resource policy to assign to DynamoDB Table.Default: - No resource policy statements are added to the created table.
- Parameters:
resourcePolicy
- Resource policy to assign to DynamoDB Table. This parameter is required.- Returns:
this
- See Also:
-
tableClass
The table class.Default: TableClass.STANDARD
- Parameters:
tableClass
- The table class. This parameter is required.- Returns:
this
-
tags
Tags to be applied to the primary table (default replica table).Default: - no tags
- Parameters:
tags
- Tags to be applied to the primary table (default replica table). This parameter is required.- Returns:
this
-
partitionKey
Partition key attribute definition.- Parameters:
partitionKey
- Partition key attribute definition. This parameter is required.- Returns:
this
-
billing
The billing mode and capacity settings to apply to the table.Default: Billing.onDemand()
- Parameters:
billing
- The billing mode and capacity settings to apply to the table. This parameter is required.- Returns:
this
-
dynamoStream
When an item in the table is modified, StreamViewType determines what information is written to the stream.Default: - streams are disabled if replicas are not configured and this property is not specified. If this property is not specified when replicas are configured, then NEW_AND_OLD_IMAGES will be the StreamViewType for all replicas
- Parameters:
dynamoStream
- When an item in the table is modified, StreamViewType determines what information is written to the stream. This parameter is required.- Returns:
this
-
encryption
The server-side encryption.Default: TableEncryptionV2.dynamoOwnedKey()
- Parameters:
encryption
- The server-side encryption. This parameter is required.- Returns:
this
-
globalSecondaryIndexes
@Stability(Stable) public TableV2.Builder globalSecondaryIndexes(List<? extends GlobalSecondaryIndexPropsV2> globalSecondaryIndexes) Global secondary indexes.Note: You can provide a maximum of 20 global secondary indexes.
Default: - no global secondary indexes
- Parameters:
globalSecondaryIndexes
- Global secondary indexes. This parameter is required.- Returns:
this
-
localSecondaryIndexes
@Stability(Stable) public TableV2.Builder localSecondaryIndexes(List<? extends LocalSecondaryIndexProps> localSecondaryIndexes) Local secondary indexes.Note: You can only provide a maximum of 5 local secondary indexes.
Default: - no local secondary indexes
- Parameters:
localSecondaryIndexes
- Local secondary indexes. This parameter is required.- Returns:
this
-
removalPolicy
The removal policy applied to the table.Default: RemovalPolicy.RETAIN
- Parameters:
removalPolicy
- The removal policy applied to the table. This parameter is required.- Returns:
this
-
replicas
Replica tables to deploy with the primary table.Note: Adding replica tables allows you to use your table as a global table. You cannot specify a replica table in the region that the primary table will be deployed to. Replica tables will only be supported if the stack deployment region is defined.
Default: - no replica tables
- Parameters:
replicas
- Replica tables to deploy with the primary table. This parameter is required.- Returns:
this
-
sortKey
Sort key attribute definition.Default: - no sort key
- Parameters:
sortKey
- Sort key attribute definition. This parameter is required.- Returns:
this
-
tableName
The name of the table.Default: - generated by CloudFormation
- Parameters:
tableName
- The name of the table. This parameter is required.- Returns:
this
-
timeToLiveAttribute
The name of the TTL attribute.Default: - TTL is disabled
- Parameters:
timeToLiveAttribute
- The name of the TTL attribute. This parameter is required.- Returns:
this
-
warmThroughput
The warm throughput configuration for the table.Default: - no warm throughput is configured
- Parameters:
warmThroughput
- The warm throughput configuration for the table. This parameter is required.- Returns:
this
-
build
-