interface ReplicaTableProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.DynamoDB.ReplicaTableProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#ReplicaTableProps |
Java | software.amazon.awscdk.services.dynamodb.ReplicaTableProps |
Python | aws_cdk.aws_dynamodb.ReplicaTableProps |
TypeScript (source) | aws-cdk-lib » aws_dynamodb » ReplicaTableProps |
Properties used to configure a replica table.
Example
import * as cdk from 'aws-cdk-lib';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'Stack', { env: { region: 'us-west-2' } });
const globalTable = new dynamodb.TableV2(stack, 'GlobalTable', {
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
replicas: [{ region: 'us-east-1' }],
});
globalTable.addReplica({ region: 'us-east-2', deletionProtection: true });
Properties
Name | Type | Description |
---|---|---|
region | string | The region that the replica table will be created in. |
contributor | boolean | Whether CloudWatch contributor insights is enabled. |
deletion | boolean | Whether deletion protection is enabled. |
global | { [string]: Replica } | Options used to configure global secondary index properties. |
kinesis | IStream | Kinesis Data Stream to capture item level changes. |
max | number | The maxium read request units. |
point | boolean | Whether point-in-time recovery is enabled. |
read | Capacity | The read capacity. |
resource | Policy | Resource policy to assign to DynamoDB Table. |
table | Table | The table class. |
tags? | Cfn [] | Tags to be applied to the primary table (default replica table). |
region
Type:
string
The region that the replica table will be created in.
contributorInsights?
Type:
boolean
(optional, default: false)
Whether CloudWatch contributor insights is enabled.
deletionProtection?
Type:
boolean
(optional, default: false)
Whether deletion protection is enabled.
globalSecondaryIndexOptions?
Type:
{ [string]:
Replica
}
(optional, default: inherited from the primary table)
Options used to configure global secondary index properties.
kinesisStream?
Type:
IStream
(optional, default: no Kinesis Data Stream)
Kinesis Data Stream to capture item level changes.
maxReadRequestUnits?
Type:
number
(optional, default: inherited from the primary table)
The maxium read request units.
Note: This can only be configured if the primary table billing is PAY_PER_REQUEST.
pointInTimeRecovery?
Type:
boolean
(optional, default: false)
Whether point-in-time recovery is enabled.
readCapacity?
Type:
Capacity
(optional, default: inherited from the primary table)
The read capacity.
Note: This can only be configured if the primary table billing is provisioned.
resourcePolicy?
Type:
Policy
(optional, default: No resource policy statements are added to the created table.)
Resource policy to assign to DynamoDB Table.
tableClass?
Type:
Table
(optional, default: TableClass.STANDARD)
The table class.
tags?
Type:
Cfn
[]
(optional, default: no tags)
Tags to be applied to the primary table (default replica table).