ContributorInsightsSpecification

class aws_cdk.aws_dynamodb.ContributorInsightsSpecification(*, enabled, mode=None)

Bases: object

Reference to ContributorInsightsSpecification.

Parameters:
  • enabled (bool) – Indicates whether contributor insights is enabled. Default: false

  • mode (Optional[ContributorInsightsMode]) – Indicates the type of metrics captured by contributor insights. Default: ACCESSED_AND_THROTTLED_KEYS

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),
    contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
        enabled=True
    ),
    point_in_time_recovery_specification=dynamodb.PointInTimeRecoverySpecification(
        point_in_time_recovery_enabled=True
    ),
    replicas=[dynamodb.ReplicaTableProps(
        region="us-east-1",
        table_class=dynamodb.TableClass.STANDARD_INFREQUENT_ACCESS,
        point_in_time_recovery_specification=dynamodb.PointInTimeRecoverySpecification(
            point_in_time_recovery_enabled=False
        )
    ), dynamodb.ReplicaTableProps(
        region="us-east-2",
        contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
            enabled=False
        )
    )
    ]
)

Attributes

enabled

Indicates whether contributor insights is enabled.

Default:

false

mode

Indicates the type of metrics captured by contributor insights.

Default:

ACCESSED_AND_THROTTLED_KEYS