Class TableV2MultiAccountReplica

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.dynamodb.TableBaseV2
software.amazon.awscdk.services.dynamodb.TableV2MultiAccountReplica
All Implemented Interfaces:
ITableRef, IEnvironmentAware, IResource, ITable, ITableV2, IResourceWithPolicy, IResourceWithPolicyV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-02T12:05:07.097Z") @Stability(Stable) public class TableV2MultiAccountReplica extends TableBaseV2
A nulti-account replica of a DynamoDB table.

This construct represents a replica table in a different AWS account from the source table. It inherits the schema (partition key, sort key, and indexes) from the source table.

Permissions on the replica side are automatically configured. You must manually add permissions to the source table using sourceTable.grants.nultiAccountReplicationTo(replica.tableArn).

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();
 
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Stable) public static final String PROPERTY_INJECTION_ID
      Uniquely identifies this class.
  • Constructor Details

    • TableV2MultiAccountReplica

      protected TableV2MultiAccountReplica(software.amazon.jsii.JsiiObjectRef objRef)
    • TableV2MultiAccountReplica

      protected TableV2MultiAccountReplica(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • TableV2MultiAccountReplica

      @Stability(Stable) public TableV2MultiAccountReplica(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable TableV2MultiAccountReplicaProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • TableV2MultiAccountReplica

      @Stability(Stable) public TableV2MultiAccountReplica(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details