ReplicaTableProps

class aws_cdk.aws_dynamodb.ReplicaTableProps(*, contributor_insights=None, deletion_protection=None, kinesis_stream=None, point_in_time_recovery=None, resource_policy=None, table_class=None, tags=None, region, global_secondary_index_options=None, max_read_request_units=None, read_capacity=None)

Bases: TableOptionsV2

Properties used to configure a replica table.

Parameters:
  • contributor_insights (Optional[bool]) – Whether CloudWatch contributor insights is enabled. Default: false

  • deletion_protection (Optional[bool]) – Whether deletion protection is enabled. Default: false

  • kinesis_stream (Optional[IStream]) – Kinesis Data Stream to capture item level changes. Default: - no Kinesis Data Stream

  • point_in_time_recovery (Optional[bool]) – Whether point-in-time recovery is enabled. Default: false

  • resource_policy (Optional[PolicyDocument]) – Resource policy to assign to DynamoDB Table. Default: - No resource policy statements are added to the created table.

  • table_class (Optional[TableClass]) – The table class. Default: TableClass.STANDARD

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – Tags to be applied to the table or replica table. Default: - no tags

  • region (str) – The region that the replica table will be created in.

  • global_secondary_index_options (Optional[Mapping[str, Union[ReplicaGlobalSecondaryIndexOptions, Dict[str, Any]]]]) – Options used to configure global secondary index properties. Default: - inherited from the primary table

  • max_read_request_units (Union[int, float, None]) – The maxium read request units. Note: This can only be configured if the primary table billing is PAY_PER_REQUEST. Default: - inherited from the primary table

  • read_capacity (Optional[Capacity]) – The read capacity. Note: This can only be configured if the primary table billing is provisioned. Default: - inherited from the primary table

ExampleMetadata:

infused

Example:

import aws_cdk as cdk


app = cdk.App()
stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))

global_table = dynamodb.TableV2(stack, "GlobalTable",
    partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
    replicas=[dynamodb.ReplicaTableProps(region="us-east-1")]
)

global_table.add_replica(region="us-east-2", deletion_protection=True)

Attributes

contributor_insights

Whether CloudWatch contributor insights is enabled.

Default:

false

deletion_protection

Whether deletion protection is enabled.

Default:

false

global_secondary_index_options

Options used to configure global secondary index properties.

Default:
  • inherited from the primary table

kinesis_stream

Kinesis Data Stream to capture item level changes.

Default:
  • no Kinesis Data Stream

max_read_request_units

The maxium read request units.

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

Default:
  • inherited from the primary table

point_in_time_recovery

Whether point-in-time recovery is enabled.

Default:

false

read_capacity

The read capacity.

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

Default:
  • inherited from the primary table

region

The region that the replica table will be created in.

resource_policy

Resource policy to assign to DynamoDB Table.

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

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-replicaspecification.html#cfn-dynamodb-globaltable-replicaspecification-resourcepolicy

table_class

The table class.

Default:

TableClass.STANDARD

tags

Tags to be applied to the table or replica table.

Default:
  • no tags