TableOptionsV2

class aws_cdk.aws_dynamodb.TableOptionsV2(*, contributor_insights=None, deletion_protection=None, kinesis_stream=None, point_in_time_recovery=None, resource_policy=None, table_class=None, tags=None)

Bases: object

Options used to configure a DynamoDB 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 primary table (default replica table). Default: - no tags

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_dynamodb as dynamodb
from aws_cdk import aws_iam as iam
from aws_cdk import aws_kinesis as kinesis

# policy_document: iam.PolicyDocument
# stream: kinesis.Stream

table_options_v2 = dynamodb.TableOptionsV2(
    contributor_insights=False,
    deletion_protection=False,
    kinesis_stream=stream,
    point_in_time_recovery=False,
    resource_policy=policy_document,
    table_class=dynamodb.TableClass.STANDARD,
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

contributor_insights

Whether CloudWatch contributor insights is enabled.

Default:

false

deletion_protection

Whether deletion protection is enabled.

Default:

false

kinesis_stream

Kinesis Data Stream to capture item level changes.

Default:
  • no Kinesis Data Stream

point_in_time_recovery

Whether point-in-time recovery is enabled.

Default:

false

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 primary table (default replica table).

Default:
  • no tags