Class TablePropsV2.Builder
java.lang.Object
software.amazon.awscdk.services.dynamodb.TablePropsV2.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<TablePropsV2>
- Enclosing interface:
TablePropsV2
@Stability(Stable)
public static final class TablePropsV2.Builder
extends Object
implements software.amazon.jsii.Builder<TablePropsV2>
A builder for
TablePropsV2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofTablePropsV2.getBilling()
build()
Builds the configured instance.contributorInsights
(Boolean contributorInsights) Sets the value ofTableOptionsV2.getContributorInsights()
deletionProtection
(Boolean deletionProtection) Sets the value ofTableOptionsV2.getDeletionProtection()
dynamoStream
(StreamViewType dynamoStream) Sets the value ofTablePropsV2.getDynamoStream()
encryption
(TableEncryptionV2 encryption) Sets the value ofTablePropsV2.getEncryption()
globalSecondaryIndexes
(List<? extends GlobalSecondaryIndexPropsV2> globalSecondaryIndexes) Sets the value ofTablePropsV2.getGlobalSecondaryIndexes()
kinesisStream
(IStream kinesisStream) Sets the value ofTableOptionsV2.getKinesisStream()
localSecondaryIndexes
(List<? extends LocalSecondaryIndexProps> localSecondaryIndexes) Sets the value ofTablePropsV2.getLocalSecondaryIndexes()
partitionKey
(Attribute partitionKey) Sets the value ofTablePropsV2.getPartitionKey()
pointInTimeRecovery
(Boolean pointInTimeRecovery) Sets the value ofTableOptionsV2.getPointInTimeRecovery()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofTablePropsV2.getRemovalPolicy()
replicas
(List<? extends ReplicaTableProps> replicas) Sets the value ofTablePropsV2.getReplicas()
Sets the value ofTablePropsV2.getSortKey()
tableClass
(TableClass tableClass) Sets the value ofTableOptionsV2.getTableClass()
Sets the value ofTablePropsV2.getTableName()
Sets the value ofTableOptionsV2.getTags()
timeToLiveAttribute
(String timeToLiveAttribute) Sets the value ofTablePropsV2.getTimeToLiveAttribute()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
partitionKey
Sets the value ofTablePropsV2.getPartitionKey()
- Parameters:
partitionKey
- Partition key attribute definition. This parameter is required.- Returns:
this
-
billing
Sets the value ofTablePropsV2.getBilling()
- Parameters:
billing
- The billing mode and capacity settings to apply to the table.- Returns:
this
-
dynamoStream
Sets the value ofTablePropsV2.getDynamoStream()
- Parameters:
dynamoStream
- When an item in the table is modified, StreamViewType determines what information is written to the stream.- Returns:
this
-
encryption
Sets the value ofTablePropsV2.getEncryption()
- Parameters:
encryption
- The server-side encryption.- Returns:
this
-
globalSecondaryIndexes
@Stability(Stable) public TablePropsV2.Builder globalSecondaryIndexes(List<? extends GlobalSecondaryIndexPropsV2> globalSecondaryIndexes) Sets the value ofTablePropsV2.getGlobalSecondaryIndexes()
- Parameters:
globalSecondaryIndexes
- Global secondary indexes. Note: You can provide a maximum of 20 global secondary indexes.- Returns:
this
-
localSecondaryIndexes
@Stability(Stable) public TablePropsV2.Builder localSecondaryIndexes(List<? extends LocalSecondaryIndexProps> localSecondaryIndexes) Sets the value ofTablePropsV2.getLocalSecondaryIndexes()
- Parameters:
localSecondaryIndexes
- Local secondary indexes. Note: You can only provide a maximum of 5 local secondary indexes.- Returns:
this
-
removalPolicy
Sets the value ofTablePropsV2.getRemovalPolicy()
- Parameters:
removalPolicy
- The removal policy applied to the table.- Returns:
this
-
replicas
Sets the value ofTablePropsV2.getReplicas()
- Parameters:
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.- Returns:
this
-
sortKey
Sets the value ofTablePropsV2.getSortKey()
- Parameters:
sortKey
- Sort key attribute definition.- Returns:
this
-
tableName
Sets the value ofTablePropsV2.getTableName()
- Parameters:
tableName
- The name of the table.- Returns:
this
-
timeToLiveAttribute
Sets the value ofTablePropsV2.getTimeToLiveAttribute()
- Parameters:
timeToLiveAttribute
- The name of the TTL attribute.- Returns:
this
-
contributorInsights
Sets the value ofTableOptionsV2.getContributorInsights()
- Parameters:
contributorInsights
- Whether CloudWatch contributor insights is enabled.- Returns:
this
-
deletionProtection
Sets the value ofTableOptionsV2.getDeletionProtection()
- Parameters:
deletionProtection
- Whether deletion protection is enabled.- Returns:
this
-
kinesisStream
Sets the value ofTableOptionsV2.getKinesisStream()
- Parameters:
kinesisStream
- Kinesis Data Stream to capture item level changes.- Returns:
this
-
pointInTimeRecovery
Sets the value ofTableOptionsV2.getPointInTimeRecovery()
- Parameters:
pointInTimeRecovery
- Whether point-in-time recovery is enabled.- Returns:
this
-
tableClass
Sets the value ofTableOptionsV2.getTableClass()
- Parameters:
tableClass
- The table class.- Returns:
this
-
tags
Sets the value ofTableOptionsV2.getTags()
- Parameters:
tags
- Tags to be applied to the table or replica table.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<TablePropsV2>
- Returns:
- a new instance of
TablePropsV2
- Throws:
NullPointerException
- if any required attribute was not provided
-