TableOptionsV2

class aws_cdk.aws_dynamodb.TableOptionsV2(*, contributor_insights=None, deletion_protection=None, kinesis_stream=None, point_in_time_recovery=None, point_in_time_recovery_specification=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]) – (deprecated) Whether point-in-time recovery is enabled. Default: false - point in time recovery is not enabled.

  • point_in_time_recovery_specification (Union[PointInTimeRecoverySpecification, Dict[str, Any], None]) – Whether point-in-time recovery is enabled and recoveryPeriodInDays is set. Default: - point in time recovery is not enabled.

  • 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,
    point_in_time_recovery_specification=dynamodb.PointInTimeRecoverySpecification(
        point_in_time_recovery_enabled=False,

        # the properties below are optional
        recovery_period_in_days=123
    ),
    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

(deprecated) Whether point-in-time recovery is enabled.

Default:

false - point in time recovery is not enabled.

Deprecated:

use pointInTimeRecoverySpecification instead

Stability:

deprecated

point_in_time_recovery_specification

Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.

Default:
  • point in time recovery is not enabled.

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