# ReplicaTableProps

Properties used to configure a replica table.

Extends: ReplicaTableProps
Extends: TableOptionsV2

- Source: [`aws-dynamodb/lib/table-v2.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-dynamodb/lib/table-v2.ts#L304)
- Type last changed: v2.154.0 · 22 Aug 2024

## Example

```ts
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

- `contributorInsights`: boolean = false — use `contributorInsightsSpecification` instead

- `contributorInsightsSpecification`: [ContributorInsightsSpecification](/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.ContributorInsightsSpecification.html) — Whether CloudWatch contributor insights is enabled and what mode is selected.

  **Default:** contributor insights is not enabled

- `deletionProtection`: boolean = false — Whether deletion protection is enabled.

- `globalSecondaryIndexOptions`: { [key: string]: [ReplicaGlobalSecondaryIndexOptions](/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.ReplicaGlobalSecondaryIndexOptions.html) } — Options used to configure global secondary index properties.

  **Default:** inherited from the primary table

- `kinesisStream`: [IStream](/cdk/api/v2/docs/aws-cdk-lib.aws_kinesis.IStream.html) — Kinesis Data Stream to capture item level changes.

  **Default:** no Kinesis Data Stream

- `maxReadRequestUnits`: number — The maximum read request units.

  **Default:** inherited from the primary table

  Note: This can only be configured if the primary table billing is PAY_PER_REQUEST.

- `pointInTimeRecovery`: boolean — use `pointInTimeRecoverySpecification` instead

  **Default:** false - point in time recovery is not enabled.

- `pointInTimeRecoverySpecification`: [PointInTimeRecoverySpecification](/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.PointInTimeRecoverySpecification.html) — Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.

  **Default:** point in time recovery is not enabled.

- `readCapacity`: [Capacity](/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Capacity.html) — The read capacity.

  **Default:** inherited from the primary table

  Note: This can only be configured if the primary table billing is provisioned.

- `region`: string (required) — The region that the replica table will be created in.

- `resourcePolicy`: [PolicyDocument](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyDocument.html) — Resource policy to assign to DynamoDB Table.

  **Default:** No resource policy statements are added to the created table.

- `streamResourcePolicy`: [PolicyDocument](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyDocument.html) — Resource policy to assign to DynamoDB Stream.

  **Default:** No resource policy statements are added to the stream.

- `tableClass`: [TableClass](/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableClass.html) = TableClass.STANDARD — The table class.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Tags to be applied to the primary table (default replica table).

  **Default:** no tags
