Interface TablePropsV2
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,TableOptionsV2
- All Known Implementing Classes:
TablePropsV2.Jsii$Proxy
Example:
import software.amazon.awscdk.*; App app = new App(); Stack stack = Stack.Builder.create(app, "Stack").env(Environment.builder().region("us-west-2").build()).build(); TableV2 globalTable = TableV2.Builder.create(stack, "GlobalTable") .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build()) // applys to all replicas, i.e., us-west-2, us-east-1, us-east-2 .removalPolicy(RemovalPolicy.DESTROY) .replicas(List.of(ReplicaTableProps.builder().region("us-east-1").build(), ReplicaTableProps.builder().region("us-east-2").build())) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forTablePropsV2
static final class
An implementation forTablePropsV2
-
Method Summary
Modifier and TypeMethodDescriptionstatic TablePropsV2.Builder
builder()
default Billing
The billing mode and capacity settings to apply to the table.default StreamViewType
When an item in the table is modified, StreamViewType determines what information is written to the stream.default TableEncryptionV2
The server-side encryption.default List<GlobalSecondaryIndexPropsV2>
Global secondary indexes.default List<LocalSecondaryIndexProps>
Local secondary indexes.Partition key attribute definition.default RemovalPolicy
The removal policy applied to the table.default List<ReplicaTableProps>
Replica tables to deploy with the primary table.default Attribute
Sort key attribute definition.default String
The name of the table.default String
The name of the TTL attribute.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.dynamodb.TableOptionsV2
getContributorInsights, getDeletionProtection, getKinesisStream, getPointInTimeRecovery, getResourcePolicy, getTableClass, getTags
-
Method Details
-
getPartitionKey
Partition key attribute definition. -
getBilling
The billing mode and capacity settings to apply to the table.Default: Billing.onDemand()
-
getDynamoStream
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
-
getEncryption
The server-side encryption.Default: TableEncryptionV2.dynamoOwnedKey()
-
getGlobalSecondaryIndexes
Global secondary indexes.Note: You can provide a maximum of 20 global secondary indexes.
Default: - no global secondary indexes
-
getLocalSecondaryIndexes
Local secondary indexes.Note: You can only provide a maximum of 5 local secondary indexes.
Default: - no local secondary indexes
-
getRemovalPolicy
The removal policy applied to the table.Default: RemovalPolicy.RETAIN
-
getReplicas
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
-
getSortKey
Sort key attribute definition.Default: - no sort key
-
getTableName
The name of the table.Default: - generated by CloudFormation
-
getTimeToLiveAttribute
The name of the TTL attribute.Default: - TTL is disabled
-
builder
- Returns:
- a
TablePropsV2.Builder
ofTablePropsV2
-