Interface TableV2MultiAccountReplicaProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,TableOptionsV2
- All Known Implementing Classes:
TableV2MultiAccountReplicaProps.Jsii$Proxy
Note: partitionKey, sortKey, and localSecondaryIndexes are not options because CloudFormation automatically inherits the key schema and LSIs from the source table via globalTableSourceArn.
Example:
import software.amazon.awscdk.*;
App app = new App();
// Source table in Account A
Stack sourceStack = Stack.Builder.create(app, "SourceStack")
.env(Environment.builder().region("us-east-2").account("111111111111").build())
.build();
TableV2 sourceTable = TableV2.Builder.create(sourceStack, "SourceTable")
.tableName("MyMultiAccountTable")
.partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
.globalTableSettingsReplicationMode(GlobalTableSettingsReplicationMode.ALL)
.build();
// Replica stack in Account B
Stack replicaStack = Stack.Builder.create(app, "ReplicaStack")
.env(Environment.builder().region("us-east-1").account("222222222222").build())
.build();
// Create replica - permissions are automatically configured
TableV2MultiAccountReplica replica = TableV2MultiAccountReplica.Builder.create(replicaStack, "ReplicaTable")
.tableName("MyMultiAccountTable")
.replicaSourceTable(sourceTable)
.globalTableSettingsReplicationMode(GlobalTableSettingsReplicationMode.ALL)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forTableV2MultiAccountReplicaPropsstatic final classAn implementation forTableV2MultiAccountReplicaProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default TableEncryptionV2The server-side encryption configuration for the replica table.Controls whether table settings are synchronized across replicas.default BooleanWhether or not to grant permissions for all indexes of the table.default RemovalPolicyThe removal policy applied to the table.default ITableV2The source table to replicate from.default StringEnforces a particular physical table name.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.dynamodb.TableOptionsV2
getContributorInsights, getContributorInsightsSpecification, getDeletionProtection, getKinesisStream, getPointInTimeRecovery, getPointInTimeRecoverySpecification, getResourcePolicy, getTableClass, getTags
-
Method Details
-
getEncryption
The server-side encryption configuration for the replica table.Note: Each replica manages its own encryption independently. This is not synchronized across replicas.
Default: TableEncryptionV2.dynamoOwnedKey()
-
getGlobalTableSettingsReplicationMode
@Stability(Stable) @Nullable default GlobalTableSettingsReplicationMode getGlobalTableSettingsReplicationMode()Controls whether table settings are synchronized across replicas.When set to ALL, synchronizable settings (billing mode, throughput, TTL, streams view type, GSIs) are automatically replicated across all replicas. When set to NONE, each replica manages its own settings independently (billing mode must be PAY_PER_REQUEST).
Note: Some settings are always synchronized (key schema, LSIs) regardless of this setting, and some are never synchronized (table class, SSE, deletion protection, PITR, tags, resource policy).
Default: GlobalTableSettingsReplicationMode.ALL
-
getGrantIndexPermissions
Whether or not to grant permissions for all indexes of the table.Note: If false, permissions will only be granted to indexes when
globalIndexesis specified.Default: false
-
getRemovalPolicy
The removal policy applied to the table.Default: RemovalPolicy.RETAIN
-
getReplicaSourceTable
The source table to replicate from.[disable-awslint:prefer-ref-interface]
Default: - must be provided
-
getTableName
Enforces a particular physical table name.Default: - generated by CloudFormation
-
builder
-