CfnGlobalTable

class aws_cdk.aws_dynamodb.CfnGlobalTable(scope, id, *, attribute_definitions, key_schema, replicas, billing_mode=None, global_secondary_indexes=None, local_secondary_indexes=None, sse_specification=None, stream_specification=None, table_name=None, time_to_live_specification=None, write_provisioned_throughput_settings=None)

Bases: CfnResource

A CloudFormation AWS::DynamoDB::GlobalTable.

The AWS::DynamoDB::GlobalTable resource enables you to create and manage a Version 2019.11.21 global table. This resource cannot be used to create or manage a Version 2017.11.29 global table. For more information, see Global tables . .. epigraph:

You cannot convert a resource of type ``AWS::DynamoDB::Table`` into a resource of type ``AWS::DynamoDB::GlobalTable`` by changing its type in your template. *Doing so might result in the deletion of your DynamoDB table.*

You can instead use the GlobalTable resource to create a new table in a single Region. This will be billed the same as a single Region table. If you later update the stack to add other Regions then Global Tables pricing will apply.

You should be aware of the following behaviors when working with DynamoDB global tables.

  • The IAM Principal executing the stack operation must have the permissions listed below in all regions where you plan to have a global table replica. The IAM Principal’s permissions should not have restrictions based on IP source address. Some global tables operations (for example, adding a replica) are asynchronous, and require that the IAM Principal is valid until they complete. You should not delete the Principal (user or IAM role) until CloudFormation has finished updating your stack.

  • dynamodb:CreateTable

  • dynamodb:UpdateTable

  • dynamodb:DeleteTable

  • dynamodb:DescribeContinuousBackups

  • dynamodb:DescribeContributorInsights

  • dynamodb:DescribeTable

  • dynamodb:DescribeTableReplicaAutoScaling

  • dynamodb:DescribeTimeToLive

  • dynamodb:ListTables

  • dynamodb:UpdateTimeToLive

  • dynamodb:UpdateContributorInsights

  • dynamodb:UpdateContinuousBackups

  • dynamodb:ListTagsOfResource

  • dynamodb:TableClass

  • dynamodb:TagResource

  • dynamodb:UntagResource

  • dynamodb:BatchWriteItem

  • dynamodb:CreateTableReplica

  • dynamodb:DeleteItem

  • dynamodb:DeleteTableReplica

  • dynamodb:DisableKinesisStreamingDestination

  • dynamodb:EnableKinesisStreamingDestination

  • dynamodb:GetItem

  • dynamodb:PutItem

  • dynamodb:Query

  • dynamodb:Scan

  • dynamodb:UpdateItem

  • dynamodb:DescribeTableReplicaAutoScaling

  • dynamodb:UpdateTableReplicaAutoScaling

  • iam:CreateServiceLinkedRole

  • kms:CreateGrant

  • kms:DescribeKey

  • application-autoscaling:DeleteScalingPolicy

  • application-autoscaling:DeleteScheduledAction

  • application-autoscaling:DeregisterScalableTarget

  • application-autoscaling:DescribeScalingPolicies

  • application-autoscaling:DescribeScalableTargets

  • application-autoscaling:PutScalingPolicy

  • application-autoscaling:PutScheduledAction

  • application-autoscaling:RegisterScalableTarget

  • When using provisioned billing mode, CloudFormation will create an auto scaling policy on each of your replicas to control their write capacities. You must configure this policy using the WriteProvisionedThroughputSettings property. CloudFormation will ensure that all replicas have the same write capacity auto scaling property. You cannot directly specify a value for write capacity for a global table.

  • If your table uses provisioned capacity, you must configure auto scaling directly in the AWS::DynamoDB::GlobalTable resource. You should not configure additional auto scaling policies on any of the table replicas or global secondary indexes, either via API or via AWS::ApplicationAutoScaling::ScalableTarget or AWS::ApplicationAutoScaling::ScalingPolicy . Doing so might result in unexpected behavior and is unsupported.

  • In AWS CloudFormation , each global table is controlled by a single stack, in a single region, regardless of the number of replicas. When you deploy your template, CloudFormation will create/update all replicas as part of a single stack operation. You should not deploy the same AWS::DynamoDB::GlobalTable resource in multiple regions. Doing so will result in errors, and is unsupported. If you deploy your application template in multiple regions, you can use conditions to only create the resource in a single region. Alternatively, you can choose to define your AWS::DynamoDB::GlobalTable resources in a stack separate from your application stack, and make sure it is only deployed to a single region.

CloudformationResource:

AWS::DynamoDB::GlobalTable

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html

ExampleMetadata:

fixture=_generated

Example:

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

cfn_global_table = dynamodb.CfnGlobalTable(self, "MyCfnGlobalTable",
    attribute_definitions=[dynamodb.CfnGlobalTable.AttributeDefinitionProperty(
        attribute_name="attributeName",
        attribute_type="attributeType"
    )],
    key_schema=[dynamodb.CfnGlobalTable.KeySchemaProperty(
        attribute_name="attributeName",
        key_type="keyType"
    )],
    replicas=[dynamodb.CfnGlobalTable.ReplicaSpecificationProperty(
        region="region",

        # the properties below are optional
        contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
            enabled=False
        ),
        deletion_protection_enabled=False,
        global_secondary_indexes=[dynamodb.CfnGlobalTable.ReplicaGlobalSecondaryIndexSpecificationProperty(
            index_name="indexName",

            # the properties below are optional
            contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
                enabled=False
            ),
            read_provisioned_throughput_settings=dynamodb.CfnGlobalTable.ReadProvisionedThroughputSettingsProperty(
                read_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
                    max_capacity=123,
                    min_capacity=123,
                    target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
                        target_value=123,

                        # the properties below are optional
                        disable_scale_in=False,
                        scale_in_cooldown=123,
                        scale_out_cooldown=123
                    ),

                    # the properties below are optional
                    seed_capacity=123
                ),
                read_capacity_units=123
            )
        )],
        kinesis_stream_specification=dynamodb.CfnGlobalTable.KinesisStreamSpecificationProperty(
            stream_arn="streamArn"
        ),
        point_in_time_recovery_specification=dynamodb.CfnGlobalTable.PointInTimeRecoverySpecificationProperty(
            point_in_time_recovery_enabled=False
        ),
        read_provisioned_throughput_settings=dynamodb.CfnGlobalTable.ReadProvisionedThroughputSettingsProperty(
            read_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
                max_capacity=123,
                min_capacity=123,
                target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
                    target_value=123,

                    # the properties below are optional
                    disable_scale_in=False,
                    scale_in_cooldown=123,
                    scale_out_cooldown=123
                ),

                # the properties below are optional
                seed_capacity=123
            ),
            read_capacity_units=123
        ),
        sse_specification=dynamodb.CfnGlobalTable.ReplicaSSESpecificationProperty(
            kms_master_key_id="kmsMasterKeyId"
        ),
        table_class="tableClass",
        tags=[CfnTag(
            key="key",
            value="value"
        )]
    )],

    # the properties below are optional
    billing_mode="billingMode",
    global_secondary_indexes=[dynamodb.CfnGlobalTable.GlobalSecondaryIndexProperty(
        index_name="indexName",
        key_schema=[dynamodb.CfnGlobalTable.KeySchemaProperty(
            attribute_name="attributeName",
            key_type="keyType"
        )],
        projection=dynamodb.CfnGlobalTable.ProjectionProperty(
            non_key_attributes=["nonKeyAttributes"],
            projection_type="projectionType"
        ),

        # the properties below are optional
        write_provisioned_throughput_settings=dynamodb.CfnGlobalTable.WriteProvisionedThroughputSettingsProperty(
            write_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
                max_capacity=123,
                min_capacity=123,
                target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
                    target_value=123,

                    # the properties below are optional
                    disable_scale_in=False,
                    scale_in_cooldown=123,
                    scale_out_cooldown=123
                ),

                # the properties below are optional
                seed_capacity=123
            )
        )
    )],
    local_secondary_indexes=[dynamodb.CfnGlobalTable.LocalSecondaryIndexProperty(
        index_name="indexName",
        key_schema=[dynamodb.CfnGlobalTable.KeySchemaProperty(
            attribute_name="attributeName",
            key_type="keyType"
        )],
        projection=dynamodb.CfnGlobalTable.ProjectionProperty(
            non_key_attributes=["nonKeyAttributes"],
            projection_type="projectionType"
        )
    )],
    sse_specification=dynamodb.CfnGlobalTable.SSESpecificationProperty(
        sse_enabled=False,

        # the properties below are optional
        sse_type="sseType"
    ),
    stream_specification=dynamodb.CfnGlobalTable.StreamSpecificationProperty(
        stream_view_type="streamViewType"
    ),
    table_name="tableName",
    time_to_live_specification=dynamodb.CfnGlobalTable.TimeToLiveSpecificationProperty(
        enabled=False,

        # the properties below are optional
        attribute_name="attributeName"
    ),
    write_provisioned_throughput_settings=dynamodb.CfnGlobalTable.WriteProvisionedThroughputSettingsProperty(
        write_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
            max_capacity=123,
            min_capacity=123,
            target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
                target_value=123,

                # the properties below are optional
                disable_scale_in=False,
                scale_in_cooldown=123,
                scale_out_cooldown=123
            ),

            # the properties below are optional
            seed_capacity=123
        )
    )
)

Create a new AWS::DynamoDB::GlobalTable.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • attribute_definitions (Union[IResolvable, Sequence[Union[AttributeDefinitionProperty, Dict[str, Any], IResolvable]]]) – A list of attributes that describe the key schema for the global table and indexes.

  • key_schema (Union[IResolvable, Sequence[Union[IResolvable, KeySchemaProperty, Dict[str, Any]]]]) – Specifies the attributes that make up the primary key for the table. The attributes in the KeySchema property must also be defined in the AttributeDefinitions property.

  • replicas (Union[IResolvable, Sequence[Union[IResolvable, ReplicaSpecificationProperty, Dict[str, Any]]]]) – Specifies the list of replicas for your global table. The list must contain at least one element, the region where the stack defining the global table is deployed. For example, if you define your table in a stack deployed to us-east-1, you must have an entry in Replicas with the region us-east-1. You cannot remove the replica in the stack region. .. epigraph:: Adding a replica might take a few minutes for an empty table, or up to several hours for large tables. If you want to add or remove a replica, we recommend submitting an UpdateStack operation containing only that change. If you add or delete a replica during an update, we recommend that you don’t update any other resources. If your stack fails to update and is rolled back while adding a new replica, you might need to manually delete the replica. You can create a new global table with as many replicas as needed. You can add or remove replicas after table creation, but you can only add or remove a single replica in each update.

  • billing_mode (Optional[str]) – Specifies how you are charged for read and write throughput and how you manage capacity. Valid values are:. - PAY_PER_REQUEST - PROVISIONED All replicas in your global table will have the same billing mode. If you use PROVISIONED billing mode, you must provide an auto scaling configuration via the WriteProvisionedThroughputSettings property. The default value of this property is PROVISIONED .

  • global_secondary_indexes (Union[IResolvable, Sequence[Union[IResolvable, GlobalSecondaryIndexProperty, Dict[str, Any]]], None]) – Global secondary indexes to be created on the global table. You can create up to 20 global secondary indexes. Each replica in your global table will have the same global secondary index settings. You can only create or delete one global secondary index in a single stack operation. Since the backfilling of an index could take a long time, CloudFormation does not wait for the index to become active. If a stack operation rolls back, CloudFormation might not delete an index that has been added. In that case, you will need to delete the index manually.

  • local_secondary_indexes (Union[IResolvable, Sequence[Union[IResolvable, LocalSecondaryIndexProperty, Dict[str, Any]]], None]) – Local secondary indexes to be created on the table. You can create up to five local secondary indexes. Each index is scoped to a given hash key value. The size of each hash key can be up to 10 gigabytes. Each replica in your global table will have the same local secondary index settings.

  • sse_specification (Union[IResolvable, SSESpecificationProperty, Dict[str, Any], None]) – Specifies the settings to enable server-side encryption. These settings will be applied to all replicas. If you plan to use customer-managed KMS keys, you must provide a key for each replica using the ReplicaSpecification.ReplicaSSESpecification property.

  • stream_specification (Union[IResolvable, StreamSpecificationProperty, Dict[str, Any], None]) – Specifies the streams settings on your global table. You must provide a value for this property if your global table contains more than one replica. You can only change the streams settings if your global table has only one replica.

  • table_name (Optional[str]) – A name for the global table. If you don’t specify a name, AWS CloudFormation generates a unique ID and uses that ID as the table name. For more information, see Name type . .. epigraph:: If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.

  • time_to_live_specification (Union[IResolvable, TimeToLiveSpecificationProperty, Dict[str, Any], None]) – Specifies the time to live (TTL) settings for the table. This setting will be applied to all replicas.

  • write_provisioned_throughput_settings (Union[IResolvable, WriteProvisionedThroughputSettingsProperty, Dict[str, Any], None]) – Specifies an auto scaling policy for write capacity. This policy will be applied to all replicas. This setting must be specified if BillingMode is set to PROVISIONED .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource)

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str)

  • value (Any)

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy])

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str)

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::DynamoDB::GlobalTable'
attr_arn

The Amazon Resource Name (ARN) of the DynamoDB table, such as arn:aws:dynamodb:us-east-2:123456789012:table/myDynamoDBTable .

The ARN returned is that of the replica in the region the stack is deployed to.

CloudformationAttribute:

Arn

attr_stream_arn

The ARN of the DynamoDB stream, such as arn:aws:dynamodb:us-east-1:123456789012:table/testddbstack-myDynamoDBTable-012A1SL7SMP5Q/stream/2015-11-30T20:10:00.000 . The StreamArn returned is that of the replica in the region the stack is deployed to.

You must specify the StreamSpecification property to use this attribute.

CloudformationAttribute:

StreamArn

attr_table_id

Unique identifier for the table, such as a123b456-01ab-23cd-123a-111222aaabbb .

The TableId returned is that of the replica in the region the stack is deployed to.

CloudformationAttribute:

TableId

attribute_definitions

A list of attributes that describe the key schema for the global table and indexes.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-attributedefinitions

billing_mode

.

  • PAY_PER_REQUEST

  • PROVISIONED

All replicas in your global table will have the same billing mode. If you use PROVISIONED billing mode, you must provide an auto scaling configuration via the WriteProvisionedThroughputSettings property. The default value of this property is PROVISIONED .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-billingmode

Type:

Specifies how you are charged for read and write throughput and how you manage capacity. Valid values are

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

global_secondary_indexes

Global secondary indexes to be created on the global table.

You can create up to 20 global secondary indexes. Each replica in your global table will have the same global secondary index settings. You can only create or delete one global secondary index in a single stack operation.

Since the backfilling of an index could take a long time, CloudFormation does not wait for the index to become active. If a stack operation rolls back, CloudFormation might not delete an index that has been added. In that case, you will need to delete the index manually.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-globalsecondaryindexes

key_schema

Specifies the attributes that make up the primary key for the table.

The attributes in the KeySchema property must also be defined in the AttributeDefinitions property.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-keyschema

local_secondary_indexes

Local secondary indexes to be created on the table.

You can create up to five local secondary indexes. Each index is scoped to a given hash key value. The size of each hash key can be up to 10 gigabytes. Each replica in your global table will have the same local secondary index settings.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-localsecondaryindexes

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The construct tree node associated with this construct.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

replicas

Specifies the list of replicas for your global table.

The list must contain at least one element, the region where the stack defining the global table is deployed. For example, if you define your table in a stack deployed to us-east-1, you must have an entry in Replicas with the region us-east-1. You cannot remove the replica in the stack region. .. epigraph:

Adding a replica might take a few minutes for an empty table, or up to several hours for large tables. If you want to add or remove a replica, we recommend submitting an ``UpdateStack`` operation containing only that change.

If you add or delete a replica during an update, we recommend that you don't update any other resources. If your stack fails to update and is rolled back while adding a new replica, you might need to manually delete the replica.

You can create a new global table with as many replicas as needed. You can add or remove replicas after table creation, but you can only add or remove a single replica in each update.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-replicas

sse_specification

Specifies the settings to enable server-side encryption.

These settings will be applied to all replicas. If you plan to use customer-managed KMS keys, you must provide a key for each replica using the ReplicaSpecification.ReplicaSSESpecification property.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-ssespecification

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

stream_specification

Specifies the streams settings on your global table.

You must provide a value for this property if your global table contains more than one replica. You can only change the streams settings if your global table has only one replica.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-streamspecification

table_name

A name for the global table.

If you don’t specify a name, AWS CloudFormation generates a unique ID and uses that ID as the table name. For more information, see Name type . .. epigraph:

If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-tablename

time_to_live_specification

Specifies the time to live (TTL) settings for the table.

This setting will be applied to all replicas.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-timetolivespecification

write_provisioned_throughput_settings

Specifies an auto scaling policy for write capacity.

This policy will be applied to all replicas. This setting must be specified if BillingMode is set to PROVISIONED .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-writeprovisionedthroughputsettings

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any)

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct)

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any)

Return type:

bool

AttributeDefinitionProperty

class CfnGlobalTable.AttributeDefinitionProperty(*, attribute_name, attribute_type)

Bases: object

Represents an attribute for describing the key schema for the table and indexes.

Parameters:
  • attribute_name (str) – A name for the attribute.

  • attribute_type (str) – The data type for the attribute, where:. - S - the attribute is of type String - N - the attribute is of type Number - B - the attribute is of type Binary

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-attributedefinition.html

ExampleMetadata:

fixture=_generated

Example:

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

attribute_definition_property = dynamodb.CfnGlobalTable.AttributeDefinitionProperty(
    attribute_name="attributeName",
    attribute_type="attributeType"
)

Attributes

attribute_name

A name for the attribute.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-attributedefinition.html#cfn-dynamodb-globaltable-attributedefinition-attributename

attribute_type

.

  • S - the attribute is of type String

  • N - the attribute is of type Number

  • B - the attribute is of type Binary

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-attributedefinition.html#cfn-dynamodb-globaltable-attributedefinition-attributetype

Type:

The data type for the attribute, where

CapacityAutoScalingSettingsProperty

class CfnGlobalTable.CapacityAutoScalingSettingsProperty(*, max_capacity, min_capacity, target_tracking_scaling_policy_configuration, seed_capacity=None)

Bases: object

Configures a scalable target and an autoscaling policy for a table or global secondary index’s read or write capacity.

Parameters:
  • max_capacity (Union[int, float]) – The maximum provisioned capacity units for the global table.

  • min_capacity (Union[int, float]) – The minimum provisioned capacity units for the global table.

  • target_tracking_scaling_policy_configuration (Union[IResolvable, TargetTrackingScalingPolicyConfigurationProperty, Dict[str, Any]]) – Defines a target tracking scaling policy.

  • seed_capacity (Union[int, float, None]) – When switching billing mode from PAY_PER_REQUEST to PROVISIONED , DynamoDB requires you to specify read and write capacity unit values for the table and for each global secondary index. These values will be applied to all replicas. The table will use these provisioned values until CloudFormation creates the autoscaling policies you configured in your template. CloudFormation cannot determine what capacity the table and its global secondary indexes will require in this time period, since they are application-dependent. If you want to switch a table’s billing mode from PAY_PER_REQUEST to PROVISIONED , you must specify a value for this property for each autoscaled resource. If you specify different values for the same resource in different regions, CloudFormation will use the highest value found in either the SeedCapacity or ReadCapacityUnits properties. For example, if your global secondary index myGSI has a SeedCapacity of 10 in us-east-1 and a fixed ReadCapacityUnits of 20 in eu-west-1, CloudFormation will initially set the read capacity for myGSI to 20. Note that if you disable ScaleIn for myGSI in us-east-1, its read capacity units might not be set back to 10. You must also specify a value for SeedCapacity when you plan to switch a table’s billing mode from PROVISIONED to PAY_PER_REQUEST , because CloudFormation might need to roll back the operation (reverting the billing mode to PROVISIONED ) and this cannot succeed without specifying a value for SeedCapacity .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-capacityautoscalingsettings.html

ExampleMetadata:

fixture=_generated

Example:

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

capacity_auto_scaling_settings_property = dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
    max_capacity=123,
    min_capacity=123,
    target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
        target_value=123,

        # the properties below are optional
        disable_scale_in=False,
        scale_in_cooldown=123,
        scale_out_cooldown=123
    ),

    # the properties below are optional
    seed_capacity=123
)

Attributes

max_capacity

The maximum provisioned capacity units for the global table.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-capacityautoscalingsettings.html#cfn-dynamodb-globaltable-capacityautoscalingsettings-maxcapacity

min_capacity

The minimum provisioned capacity units for the global table.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-capacityautoscalingsettings.html#cfn-dynamodb-globaltable-capacityautoscalingsettings-mincapacity

seed_capacity

When switching billing mode from PAY_PER_REQUEST to PROVISIONED , DynamoDB requires you to specify read and write capacity unit values for the table and for each global secondary index.

These values will be applied to all replicas. The table will use these provisioned values until CloudFormation creates the autoscaling policies you configured in your template. CloudFormation cannot determine what capacity the table and its global secondary indexes will require in this time period, since they are application-dependent.

If you want to switch a table’s billing mode from PAY_PER_REQUEST to PROVISIONED , you must specify a value for this property for each autoscaled resource. If you specify different values for the same resource in different regions, CloudFormation will use the highest value found in either the SeedCapacity or ReadCapacityUnits properties. For example, if your global secondary index myGSI has a SeedCapacity of 10 in us-east-1 and a fixed ReadCapacityUnits of 20 in eu-west-1, CloudFormation will initially set the read capacity for myGSI to 20. Note that if you disable ScaleIn for myGSI in us-east-1, its read capacity units might not be set back to 10.

You must also specify a value for SeedCapacity when you plan to switch a table’s billing mode from PROVISIONED to PAY_PER_REQUEST , because CloudFormation might need to roll back the operation (reverting the billing mode to PROVISIONED ) and this cannot succeed without specifying a value for SeedCapacity .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-capacityautoscalingsettings.html#cfn-dynamodb-globaltable-capacityautoscalingsettings-seedcapacity

target_tracking_scaling_policy_configuration

Defines a target tracking scaling policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-capacityautoscalingsettings.html#cfn-dynamodb-globaltable-capacityautoscalingsettings-targettrackingscalingpolicyconfiguration

ContributorInsightsSpecificationProperty

class CfnGlobalTable.ContributorInsightsSpecificationProperty(*, enabled)

Bases: object

Configures contributor insights settings for a replica or one of its indexes.

Parameters:

enabled (Union[bool, IResolvable]) – Indicates whether CloudWatch Contributor Insights are to be enabled (true) or disabled (false).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-contributorinsightsspecification.html

ExampleMetadata:

fixture=_generated

Example:

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

contributor_insights_specification_property = dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
    enabled=False
)

Attributes

enabled

Indicates whether CloudWatch Contributor Insights are to be enabled (true) or disabled (false).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-contributorinsightsspecification.html#cfn-dynamodb-globaltable-contributorinsightsspecification-enabled

GlobalSecondaryIndexProperty

class CfnGlobalTable.GlobalSecondaryIndexProperty(*, index_name, key_schema, projection, write_provisioned_throughput_settings=None)

Bases: object

Allows you to specify a global secondary index for the global table.

The index will be defined on all replicas.

Parameters:
  • index_name (str) – The name of the global secondary index. The name must be unique among all other indexes on this table.

  • key_schema (Union[IResolvable, Sequence[Union[IResolvable, KeySchemaProperty, Dict[str, Any]]]]) – The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: - HASH - partition key - RANGE - sort key > The partition key of an item is also known as its hash attribute . The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. .. epigraph:: The sort key of an item is also known as its range attribute . The term “range attribute” derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

  • projection (Union[IResolvable, ProjectionProperty, Dict[str, Any]]) – Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

  • write_provisioned_throughput_settings (Union[IResolvable, WriteProvisionedThroughputSettingsProperty, Dict[str, Any], None]) – Defines write capacity settings for the global secondary index. You must specify a value for this property if the table’s BillingMode is PROVISIONED . All replicas will have the same write capacity settings for this global secondary index.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-globalsecondaryindex.html

ExampleMetadata:

fixture=_generated

Example:

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

global_secondary_index_property = dynamodb.CfnGlobalTable.GlobalSecondaryIndexProperty(
    index_name="indexName",
    key_schema=[dynamodb.CfnGlobalTable.KeySchemaProperty(
        attribute_name="attributeName",
        key_type="keyType"
    )],
    projection=dynamodb.CfnGlobalTable.ProjectionProperty(
        non_key_attributes=["nonKeyAttributes"],
        projection_type="projectionType"
    ),

    # the properties below are optional
    write_provisioned_throughput_settings=dynamodb.CfnGlobalTable.WriteProvisionedThroughputSettingsProperty(
        write_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
            max_capacity=123,
            min_capacity=123,
            target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
                target_value=123,

                # the properties below are optional
                disable_scale_in=False,
                scale_in_cooldown=123,
                scale_out_cooldown=123
            ),

            # the properties below are optional
            seed_capacity=123
        )
    )
)

Attributes

index_name

The name of the global secondary index.

The name must be unique among all other indexes on this table.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-globalsecondaryindex.html#cfn-dynamodb-globaltable-globalsecondaryindex-indexname

key_schema
  • HASH - partition key - RANGE - sort key > The partition key of an item is also known as its hash attribute .

The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. .. epigraph:

The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-globalsecondaryindex.html#cfn-dynamodb-globaltable-globalsecondaryindex-keyschema

Type:

The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types

projection

Represents attributes that are copied (projected) from the table into the global secondary index.

These are in addition to the primary key attributes and index key attributes, which are automatically projected.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-globalsecondaryindex.html#cfn-dynamodb-globaltable-globalsecondaryindex-projection

write_provisioned_throughput_settings

Defines write capacity settings for the global secondary index.

You must specify a value for this property if the table’s BillingMode is PROVISIONED . All replicas will have the same write capacity settings for this global secondary index.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-globalsecondaryindex.html#cfn-dynamodb-globaltable-globalsecondaryindex-writeprovisionedthroughputsettings

KeySchemaProperty

class CfnGlobalTable.KeySchemaProperty(*, attribute_name, key_type)

Bases: object

Represents a single element of a key schema.

A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement for the sort key.

A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.

Parameters:
  • attribute_name (str) – The name of a key attribute.

  • key_type (str) – The role that this key attribute will assume:. - HASH - partition key - RANGE - sort key .. epigraph:: The partition key of an item is also known as its hash attribute . The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its range attribute . The term “range attribute” derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-keyschema.html

ExampleMetadata:

fixture=_generated

Example:

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

key_schema_property = dynamodb.CfnGlobalTable.KeySchemaProperty(
    attribute_name="attributeName",
    key_type="keyType"
)

Attributes

attribute_name

The name of a key attribute.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-keyschema.html#cfn-dynamodb-globaltable-keyschema-attributename

key_type

.

  • HASH - partition key

  • RANGE - sort key

The partition key of an item is also known as its hash attribute . The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

The sort key of an item is also known as its range attribute . The term “range attribute” derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-keyschema.html#cfn-dynamodb-globaltable-keyschema-keytype

Type:

The role that this key attribute will assume

KinesisStreamSpecificationProperty

class CfnGlobalTable.KinesisStreamSpecificationProperty(*, stream_arn)

Bases: object

The Kinesis Data Streams configuration for the specified global table replica.

Parameters:

stream_arn (str) – The ARN for a specific Kinesis data stream.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-kinesisstreamspecification.html

ExampleMetadata:

fixture=_generated

Example:

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

kinesis_stream_specification_property = dynamodb.CfnGlobalTable.KinesisStreamSpecificationProperty(
    stream_arn="streamArn"
)

Attributes

stream_arn

The ARN for a specific Kinesis data stream.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-kinesisstreamspecification.html#cfn-dynamodb-globaltable-kinesisstreamspecification-streamarn

LocalSecondaryIndexProperty

class CfnGlobalTable.LocalSecondaryIndexProperty(*, index_name, key_schema, projection)

Bases: object

Represents the properties of a local secondary index.

A local secondary index can only be created when its parent table is created.

Parameters:
  • index_name (str) – The name of the local secondary index. The name must be unique among all other indexes on this table.

  • key_schema (Union[IResolvable, Sequence[Union[IResolvable, KeySchemaProperty, Dict[str, Any]]]]) – The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types: - HASH - partition key - RANGE - sort key > The partition key of an item is also known as its hash attribute . The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. .. epigraph:: The sort key of an item is also known as its range attribute . The term “range attribute” derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

  • projection (Union[IResolvable, ProjectionProperty, Dict[str, Any]]) – Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-localsecondaryindex.html

ExampleMetadata:

fixture=_generated

Example:

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

local_secondary_index_property = dynamodb.CfnGlobalTable.LocalSecondaryIndexProperty(
    index_name="indexName",
    key_schema=[dynamodb.CfnGlobalTable.KeySchemaProperty(
        attribute_name="attributeName",
        key_type="keyType"
    )],
    projection=dynamodb.CfnGlobalTable.ProjectionProperty(
        non_key_attributes=["nonKeyAttributes"],
        projection_type="projectionType"
    )
)

Attributes

index_name

The name of the local secondary index.

The name must be unique among all other indexes on this table.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-localsecondaryindex.html#cfn-dynamodb-globaltable-localsecondaryindex-indexname

key_schema
  • HASH - partition key - RANGE - sort key > The partition key of an item is also known as its hash attribute .

The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. .. epigraph:

The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-localsecondaryindex.html#cfn-dynamodb-globaltable-localsecondaryindex-keyschema

Type:

The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types

projection

Represents attributes that are copied (projected) from the table into the local secondary index.

These are in addition to the primary key attributes and index key attributes, which are automatically projected.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-localsecondaryindex.html#cfn-dynamodb-globaltable-localsecondaryindex-projection

PointInTimeRecoverySpecificationProperty

class CfnGlobalTable.PointInTimeRecoverySpecificationProperty(*, point_in_time_recovery_enabled=None)

Bases: object

Represents the settings used to enable point in time recovery.

Parameters:

point_in_time_recovery_enabled (Union[bool, IResolvable, None]) – Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-pointintimerecoveryspecification.html

ExampleMetadata:

fixture=_generated

Example:

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

point_in_time_recovery_specification_property = dynamodb.CfnGlobalTable.PointInTimeRecoverySpecificationProperty(
    point_in_time_recovery_enabled=False
)

Attributes

point_in_time_recovery_enabled

Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-pointintimerecoveryspecification.html#cfn-dynamodb-globaltable-pointintimerecoveryspecification-pointintimerecoveryenabled

ProjectionProperty

class CfnGlobalTable.ProjectionProperty(*, non_key_attributes=None, projection_type=None)

Bases: object

Represents attributes that are copied (projected) from the table into an index.

These are in addition to the primary key attributes and index key attributes, which are automatically projected.

Parameters:
  • non_key_attributes (Optional[Sequence[str]]) – Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

  • projection_type (Optional[str]) – The set of attributes that are projected into the index:. - KEYS_ONLY - Only the index and primary keys are projected into the index. - INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify. - ALL - All of the table attributes are projected into the index.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-projection.html

ExampleMetadata:

fixture=_generated

Example:

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

projection_property = dynamodb.CfnGlobalTable.ProjectionProperty(
    non_key_attributes=["nonKeyAttributes"],
    projection_type="projectionType"
)

Attributes

non_key_attributes

Represents the non-key attribute names which will be projected into the index.

For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-projection.html#cfn-dynamodb-globaltable-projection-nonkeyattributes

projection_type

.

  • KEYS_ONLY - Only the index and primary keys are projected into the index.

  • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

  • ALL - All of the table attributes are projected into the index.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-projection.html#cfn-dynamodb-globaltable-projection-projectiontype

Type:

The set of attributes that are projected into the index

ReadProvisionedThroughputSettingsProperty

class CfnGlobalTable.ReadProvisionedThroughputSettingsProperty(*, read_capacity_auto_scaling_settings=None, read_capacity_units=None)

Bases: object

Allows you to specify the read capacity settings for a replica table or a replica global secondary index when the BillingMode is set to PROVISIONED .

You must specify a value for either ReadCapacityUnits or ReadCapacityAutoScalingSettings , but not both. You can switch between fixed capacity and auto scaling.

Parameters:
  • read_capacity_auto_scaling_settings (Union[IResolvable, CapacityAutoScalingSettingsProperty, Dict[str, Any], None]) – Specifies auto scaling settings for the replica table or global secondary index.

  • read_capacity_units (Union[int, float, None]) – Specifies a fixed read capacity for the replica table or global secondary index.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-readprovisionedthroughputsettings.html

ExampleMetadata:

fixture=_generated

Example:

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

read_provisioned_throughput_settings_property = dynamodb.CfnGlobalTable.ReadProvisionedThroughputSettingsProperty(
    read_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
        max_capacity=123,
        min_capacity=123,
        target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
            target_value=123,

            # the properties below are optional
            disable_scale_in=False,
            scale_in_cooldown=123,
            scale_out_cooldown=123
        ),

        # the properties below are optional
        seed_capacity=123
    ),
    read_capacity_units=123
)

Attributes

read_capacity_auto_scaling_settings

Specifies auto scaling settings for the replica table or global secondary index.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-readprovisionedthroughputsettings.html#cfn-dynamodb-globaltable-readprovisionedthroughputsettings-readcapacityautoscalingsettings

read_capacity_units

Specifies a fixed read capacity for the replica table or global secondary index.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-readprovisionedthroughputsettings.html#cfn-dynamodb-globaltable-readprovisionedthroughputsettings-readcapacityunits

ReplicaGlobalSecondaryIndexSpecificationProperty

class CfnGlobalTable.ReplicaGlobalSecondaryIndexSpecificationProperty(*, index_name, contributor_insights_specification=None, read_provisioned_throughput_settings=None)

Bases: object

Represents the properties of a global secondary index that can be set on a per-replica basis.

Parameters:
  • index_name (str) – The name of the global secondary index. The name must be unique among all other indexes on this table.

  • contributor_insights_specification (Union[IResolvable, ContributorInsightsSpecificationProperty, Dict[str, Any], None]) – Updates the status for contributor insights for a specific table or index. CloudWatch Contributor Insights for DynamoDB graphs display the partition key and (if applicable) sort key of frequently accessed items and frequently throttled items in plaintext. If you require the use of AWS Key Management Service (KMS) to encrypt this table’s partition key and sort key data with an AWS managed key or customer managed key, you should not enable CloudWatch Contributor Insights for DynamoDB for this table.

  • read_provisioned_throughput_settings (Union[IResolvable, ReadProvisionedThroughputSettingsProperty, Dict[str, Any], None]) – Allows you to specify the read capacity settings for a replica global secondary index when the BillingMode is set to PROVISIONED .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-replicaglobalsecondaryindexspecification.html

ExampleMetadata:

fixture=_generated

Example:

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

replica_global_secondary_index_specification_property = dynamodb.CfnGlobalTable.ReplicaGlobalSecondaryIndexSpecificationProperty(
    index_name="indexName",

    # the properties below are optional
    contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
        enabled=False
    ),
    read_provisioned_throughput_settings=dynamodb.CfnGlobalTable.ReadProvisionedThroughputSettingsProperty(
        read_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
            max_capacity=123,
            min_capacity=123,
            target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
                target_value=123,

                # the properties below are optional
                disable_scale_in=False,
                scale_in_cooldown=123,
                scale_out_cooldown=123
            ),

            # the properties below are optional
            seed_capacity=123
        ),
        read_capacity_units=123
    )
)

Attributes

contributor_insights_specification

Updates the status for contributor insights for a specific table or index.

CloudWatch Contributor Insights for DynamoDB graphs display the partition key and (if applicable) sort key of frequently accessed items and frequently throttled items in plaintext. If you require the use of AWS Key Management Service (KMS) to encrypt this table’s partition key and sort key data with an AWS managed key or customer managed key, you should not enable CloudWatch Contributor Insights for DynamoDB for this table.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-replicaglobalsecondaryindexspecification.html#cfn-dynamodb-globaltable-replicaglobalsecondaryindexspecification-contributorinsightsspecification

index_name

The name of the global secondary index.

The name must be unique among all other indexes on this table.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-replicaglobalsecondaryindexspecification.html#cfn-dynamodb-globaltable-replicaglobalsecondaryindexspecification-indexname

read_provisioned_throughput_settings

Allows you to specify the read capacity settings for a replica global secondary index when the BillingMode is set to PROVISIONED .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-replicaglobalsecondaryindexspecification.html#cfn-dynamodb-globaltable-replicaglobalsecondaryindexspecification-readprovisionedthroughputsettings

ReplicaSSESpecificationProperty

class CfnGlobalTable.ReplicaSSESpecificationProperty(*, kms_master_key_id)

Bases: object

Allows you to specify a KMS key identifier to be used for server-side encryption.

The key can be specified via ARN, key ID, or alias. The key must be created in the same region as the replica.

Parameters:

kms_master_key_id (str) – The AWS KMS key that should be used for the AWS KMS encryption. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key alias/aws/dynamodb .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-replicassespecification.html

ExampleMetadata:

fixture=_generated

Example:

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

replica_sSESpecification_property = dynamodb.CfnGlobalTable.ReplicaSSESpecificationProperty(
    kms_master_key_id="kmsMasterKeyId"
)

Attributes

kms_master_key_id

The AWS KMS key that should be used for the AWS KMS encryption.

To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key alias/aws/dynamodb .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-replicassespecification.html#cfn-dynamodb-globaltable-replicassespecification-kmsmasterkeyid

ReplicaSpecificationProperty

class CfnGlobalTable.ReplicaSpecificationProperty(*, region, contributor_insights_specification=None, deletion_protection_enabled=None, global_secondary_indexes=None, kinesis_stream_specification=None, point_in_time_recovery_specification=None, read_provisioned_throughput_settings=None, sse_specification=None, table_class=None, tags=None)

Bases: object

Defines settings specific to a single replica of a global table.

Parameters:
  • region (str) – The region in which this replica exists.

  • contributor_insights_specification (Union[IResolvable, ContributorInsightsSpecificationProperty, Dict[str, Any], None]) – The settings used to enable or disable CloudWatch Contributor Insights for the specified replica. When not specified, defaults to contributor insights disabled for the replica.

  • deletion_protection_enabled (Union[bool, IResolvable, None]) – Determines if a replica is protected from deletion. When enabled, the table cannot be deleted by any user or process. This setting is disabled by default. For more information, see Using deletion protection in the Amazon DynamoDB Developer Guide .

  • global_secondary_indexes (Union[IResolvable, Sequence[Union[IResolvable, ReplicaGlobalSecondaryIndexSpecificationProperty, Dict[str, Any]]], None]) – Defines additional settings for the global secondary indexes of this replica.

  • kinesis_stream_specification (Union[IResolvable, KinesisStreamSpecificationProperty, Dict[str, Any], None]) – Defines the Kinesis Data Streams configuration for the specified replica.

  • point_in_time_recovery_specification (Union[IResolvable, PointInTimeRecoverySpecificationProperty, Dict[str, Any], None]) – The settings used to enable point in time recovery. When not specified, defaults to point in time recovery disabled for the replica.

  • read_provisioned_throughput_settings (Union[IResolvable, ReadProvisionedThroughputSettingsProperty, Dict[str, Any], None]) – Defines read capacity settings for the replica table.

  • sse_specification (Union[IResolvable, ReplicaSSESpecificationProperty, Dict[str, Any], None]) – Allows you to specify a customer-managed key for the replica. When using customer-managed keys for server-side encryption, this property must have a value in all replicas.

  • table_class (Optional[str]) – The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An array of key-value pairs to apply to this replica. For more information, see Tag .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-replicaspecification.html

ExampleMetadata:

fixture=_generated

Example:

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

replica_specification_property = dynamodb.CfnGlobalTable.ReplicaSpecificationProperty(
    region="region",

    # the properties below are optional
    contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
        enabled=False
    ),
    deletion_protection_enabled=False,
    global_secondary_indexes=[dynamodb.CfnGlobalTable.ReplicaGlobalSecondaryIndexSpecificationProperty(
        index_name="indexName",

        # the properties below are optional
        contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
            enabled=False
        ),
        read_provisioned_throughput_settings=dynamodb.CfnGlobalTable.ReadProvisionedThroughputSettingsProperty(
            read_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
                max_capacity=123,
                min_capacity=123,
                target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
                    target_value=123,

                    # the properties below are optional
                    disable_scale_in=False,
                    scale_in_cooldown=123,
                    scale_out_cooldown=123
                ),

                # the properties below are optional
                seed_capacity=123
            ),
            read_capacity_units=123
        )
    )],
    kinesis_stream_specification=dynamodb.CfnGlobalTable.KinesisStreamSpecificationProperty(
        stream_arn="streamArn"
    ),
    point_in_time_recovery_specification=dynamodb.CfnGlobalTable.PointInTimeRecoverySpecificationProperty(
        point_in_time_recovery_enabled=False
    ),
    read_provisioned_throughput_settings=dynamodb.CfnGlobalTable.ReadProvisionedThroughputSettingsProperty(
        read_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
            max_capacity=123,
            min_capacity=123,
            target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
                target_value=123,

                # the properties below are optional
                disable_scale_in=False,
                scale_in_cooldown=123,
                scale_out_cooldown=123
            ),

            # the properties below are optional
            seed_capacity=123
        ),
        read_capacity_units=123
    ),
    sse_specification=dynamodb.CfnGlobalTable.ReplicaSSESpecificationProperty(
        kms_master_key_id="kmsMasterKeyId"
    ),
    table_class="tableClass",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

contributor_insights_specification

The settings used to enable or disable CloudWatch Contributor Insights for the specified replica.

When not specified, defaults to contributor insights disabled for the replica.

Link:

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

deletion_protection_enabled

Determines if a replica is protected from deletion.

When enabled, the table cannot be deleted by any user or process. This setting is disabled by default. For more information, see Using deletion protection in the Amazon DynamoDB Developer Guide .

Link:

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

global_secondary_indexes

Defines additional settings for the global secondary indexes of this replica.

Link:

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

kinesis_stream_specification

Defines the Kinesis Data Streams configuration for the specified replica.

Link:

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

point_in_time_recovery_specification

The settings used to enable point in time recovery.

When not specified, defaults to point in time recovery disabled for the replica.

Link:

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

read_provisioned_throughput_settings

Defines read capacity settings for the replica table.

Link:

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

region

The region in which this replica exists.

Link:

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

sse_specification

Allows you to specify a customer-managed key for the replica.

When using customer-managed keys for server-side encryption, this property must have a value in all replicas.

Link:

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

table_class

The table class of the specified table.

Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

Link:

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

tags

An array of key-value pairs to apply to this replica.

For more information, see Tag .

Link:

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

SSESpecificationProperty

class CfnGlobalTable.SSESpecificationProperty(*, sse_enabled, sse_type=None)

Bases: object

Represents the settings used to enable server-side encryption.

Parameters:
  • sse_enabled (Union[bool, IResolvable]) – Indicates whether server-side encryption is performed using an AWS managed key or an AWS owned key. If enabled (true), server-side encryption type is set to KMS and an AWS managed key is used ( AWS KMS charges apply). If disabled (false) or not specified,server-side encryption is set to an AWS owned key. If you choose to use KMS encryption, you can also use customer managed KMS keys by specifying them in the ReplicaSpecification.SSESpecification object. You cannot mix AWS managed and customer managed KMS keys.

  • sse_type (Optional[str]) – Server-side encryption type. The only supported value is:. - KMS - Server-side encryption that uses AWS Key Management Service . The key is stored in your account and is managed by AWS KMS ( AWS KMS charges apply).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-ssespecification.html

ExampleMetadata:

fixture=_generated

Example:

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

s_sESpecification_property = dynamodb.CfnGlobalTable.SSESpecificationProperty(
    sse_enabled=False,

    # the properties below are optional
    sse_type="sseType"
)

Attributes

sse_enabled

Indicates whether server-side encryption is performed using an AWS managed key or an AWS owned key.

If enabled (true), server-side encryption type is set to KMS and an AWS managed key is used ( AWS KMS charges apply). If disabled (false) or not specified,server-side encryption is set to an AWS owned key. If you choose to use KMS encryption, you can also use customer managed KMS keys by specifying them in the ReplicaSpecification.SSESpecification object. You cannot mix AWS managed and customer managed KMS keys.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-ssespecification.html#cfn-dynamodb-globaltable-ssespecification-sseenabled

sse_type

.

  • KMS - Server-side encryption that uses AWS Key Management Service . The key is stored in your account and is managed by AWS KMS ( AWS KMS charges apply).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-ssespecification.html#cfn-dynamodb-globaltable-ssespecification-ssetype

Type:

Server-side encryption type. The only supported value is

StreamSpecificationProperty

class CfnGlobalTable.StreamSpecificationProperty(*, stream_view_type)

Bases: object

Represents the DynamoDB Streams configuration for a table in DynamoDB.

You can only modify this value if your AWS::DynamoDB::GlobalTable contains only one entry in Replicas . You must specify a value for this property if your AWS::DynamoDB::GlobalTable contains more than one replica.

Parameters:

stream_view_type (str) – When an item in the table is modified, StreamViewType determines what information is written to the stream for this table. Valid values for StreamViewType are: - KEYS_ONLY - Only the key attributes of the modified item are written to the stream. - NEW_IMAGE - The entire item, as it appears after it was modified, is written to the stream. - OLD_IMAGE - The entire item, as it appeared before it was modified, is written to the stream. - NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are written to the stream.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-streamspecification.html

ExampleMetadata:

fixture=_generated

Example:

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

stream_specification_property = dynamodb.CfnGlobalTable.StreamSpecificationProperty(
    stream_view_type="streamViewType"
)

Attributes

stream_view_type

When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.

Valid values for StreamViewType are:

  • KEYS_ONLY - Only the key attributes of the modified item are written to the stream.

  • NEW_IMAGE - The entire item, as it appears after it was modified, is written to the stream.

  • OLD_IMAGE - The entire item, as it appeared before it was modified, is written to the stream.

  • NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are written to the stream.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-streamspecification.html#cfn-dynamodb-globaltable-streamspecification-streamviewtype

TargetTrackingScalingPolicyConfigurationProperty

class CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(*, target_value, disable_scale_in=None, scale_in_cooldown=None, scale_out_cooldown=None)

Bases: object

Defines a target tracking scaling policy.

Parameters:
  • target_value (Union[int, float]) – Defines a target value for the scaling policy.

  • disable_scale_in (Union[bool, IResolvable, None]) – Indicates whether scale in by the target tracking scaling policy is disabled. The default value is false .

  • scale_in_cooldown (Union[int, float, None]) – The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start.

  • scale_out_cooldown (Union[int, float, None]) – The amount of time, in seconds, after a scale-out activity completes before another scale-out activity can start.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-targettrackingscalingpolicyconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

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

target_tracking_scaling_policy_configuration_property = dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
    target_value=123,

    # the properties below are optional
    disable_scale_in=False,
    scale_in_cooldown=123,
    scale_out_cooldown=123
)

Attributes

disable_scale_in

Indicates whether scale in by the target tracking scaling policy is disabled.

The default value is false .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-targettrackingscalingpolicyconfiguration.html#cfn-dynamodb-globaltable-targettrackingscalingpolicyconfiguration-disablescalein

scale_in_cooldown

The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-targettrackingscalingpolicyconfiguration.html#cfn-dynamodb-globaltable-targettrackingscalingpolicyconfiguration-scaleincooldown

scale_out_cooldown

The amount of time, in seconds, after a scale-out activity completes before another scale-out activity can start.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-targettrackingscalingpolicyconfiguration.html#cfn-dynamodb-globaltable-targettrackingscalingpolicyconfiguration-scaleoutcooldown

target_value

Defines a target value for the scaling policy.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-targettrackingscalingpolicyconfiguration.html#cfn-dynamodb-globaltable-targettrackingscalingpolicyconfiguration-targetvalue

TimeToLiveSpecificationProperty

class CfnGlobalTable.TimeToLiveSpecificationProperty(*, enabled, attribute_name=None)

Bases: object

Represents the settings used to enable or disable Time to Live (TTL) for the specified table.

All replicas will have the same time to live configuration.

Parameters:
  • enabled (Union[bool, IResolvable]) – Indicates whether TTL is to be enabled (true) or disabled (false) on the table.

  • attribute_name (Optional[str]) – The name of the attribute used to store the expiration time for items in the table. Currently, you cannot directly change the attribute name used to evaluate time to live. In order to do so, you must first disable time to live, and then re-enable it with the new attribute name. It can take up to one hour for changes to time to live to take effect. If you attempt to modify time to live within that time window, your stack operation might be delayed.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-timetolivespecification.html

ExampleMetadata:

fixture=_generated

Example:

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

time_to_live_specification_property = dynamodb.CfnGlobalTable.TimeToLiveSpecificationProperty(
    enabled=False,

    # the properties below are optional
    attribute_name="attributeName"
)

Attributes

attribute_name

The name of the attribute used to store the expiration time for items in the table.

Currently, you cannot directly change the attribute name used to evaluate time to live. In order to do so, you must first disable time to live, and then re-enable it with the new attribute name. It can take up to one hour for changes to time to live to take effect. If you attempt to modify time to live within that time window, your stack operation might be delayed.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-timetolivespecification.html#cfn-dynamodb-globaltable-timetolivespecification-attributename

enabled

Indicates whether TTL is to be enabled (true) or disabled (false) on the table.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-timetolivespecification.html#cfn-dynamodb-globaltable-timetolivespecification-enabled

WriteProvisionedThroughputSettingsProperty

class CfnGlobalTable.WriteProvisionedThroughputSettingsProperty(*, write_capacity_auto_scaling_settings=None)

Bases: object

Specifies an auto scaling policy for write capacity.

This policy will be applied to all replicas. This setting must be specified if BillingMode is set to PROVISIONED .

Parameters:

write_capacity_auto_scaling_settings (Union[IResolvable, CapacityAutoScalingSettingsProperty, Dict[str, Any], None]) – Specifies auto scaling settings for the replica table or global secondary index.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-writeprovisionedthroughputsettings.html

ExampleMetadata:

fixture=_generated

Example:

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

write_provisioned_throughput_settings_property = dynamodb.CfnGlobalTable.WriteProvisionedThroughputSettingsProperty(
    write_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
        max_capacity=123,
        min_capacity=123,
        target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
            target_value=123,

            # the properties below are optional
            disable_scale_in=False,
            scale_in_cooldown=123,
            scale_out_cooldown=123
        ),

        # the properties below are optional
        seed_capacity=123
    )
)

Attributes

write_capacity_auto_scaling_settings

Specifies auto scaling settings for the replica table or global secondary index.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-writeprovisionedthroughputsettings.html#cfn-dynamodb-globaltable-writeprovisionedthroughputsettings-writecapacityautoscalingsettings