CfnTablePropsMixin

class aws_cdk.mixins_preview.aws_dynamodb.mixins.CfnTablePropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::DynamoDB::Table resource creates a DynamoDB table. For more information, see CreateTable in the Amazon DynamoDB API Reference .

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

  • AWS CloudFormation typically creates DynamoDB tables in parallel. However, if your template includes multiple DynamoDB tables with indexes, you must declare dependencies so that the tables are created sequentially. Amazon DynamoDB limits the number of tables with secondary indexes that are in the creating state. If you create multiple tables with indexes at the same time, DynamoDB returns an error and the stack operation fails. For an example, see DynamoDB Table with a DependsOn Attribute .

Our guidance is to use the latest schema documented for your AWS CloudFormation templates. This schema supports the provisioning of all table settings below. When using this schema in your AWS CloudFormation templates, please ensure that your Identity and Access Management ( IAM ) policies are updated with appropriate permissions to allow for the authorization of these setting changes.

See:

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

CloudformationResource:

AWS::DynamoDB::Table

Mixin:

true

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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

# policy_document: Any

cfn_table_props_mixin = dynamodb_mixins.CfnTablePropsMixin(dynamodb_mixins.CfnTableMixinProps(
    attribute_definitions=[dynamodb_mixins.CfnTablePropsMixin.AttributeDefinitionProperty(
        attribute_name="attributeName",
        attribute_type="attributeType"
    )],
    billing_mode="billingMode",
    contributor_insights_specification=dynamodb_mixins.CfnTablePropsMixin.ContributorInsightsSpecificationProperty(
        enabled=False,
        mode="mode"
    ),
    deletion_protection_enabled=False,
    global_secondary_indexes=[dynamodb_mixins.CfnTablePropsMixin.GlobalSecondaryIndexProperty(
        contributor_insights_specification=dynamodb_mixins.CfnTablePropsMixin.ContributorInsightsSpecificationProperty(
            enabled=False,
            mode="mode"
        ),
        index_name="indexName",
        key_schema=[dynamodb_mixins.CfnTablePropsMixin.KeySchemaProperty(
            attribute_name="attributeName",
            key_type="keyType"
        )],
        on_demand_throughput=dynamodb_mixins.CfnTablePropsMixin.OnDemandThroughputProperty(
            max_read_request_units=123,
            max_write_request_units=123
        ),
        projection=dynamodb_mixins.CfnTablePropsMixin.ProjectionProperty(
            non_key_attributes=["nonKeyAttributes"],
            projection_type="projectionType"
        ),
        provisioned_throughput=dynamodb_mixins.CfnTablePropsMixin.ProvisionedThroughputProperty(
            read_capacity_units=123,
            write_capacity_units=123
        ),
        warm_throughput=dynamodb_mixins.CfnTablePropsMixin.WarmThroughputProperty(
            read_units_per_second=123,
            write_units_per_second=123
        )
    )],
    import_source_specification=dynamodb_mixins.CfnTablePropsMixin.ImportSourceSpecificationProperty(
        input_compression_type="inputCompressionType",
        input_format="inputFormat",
        input_format_options=dynamodb_mixins.CfnTablePropsMixin.InputFormatOptionsProperty(
            csv=dynamodb_mixins.CfnTablePropsMixin.CsvProperty(
                delimiter="delimiter",
                header_list=["headerList"]
            )
        ),
        s3_bucket_source=dynamodb_mixins.CfnTablePropsMixin.S3BucketSourceProperty(
            s3_bucket="s3Bucket",
            s3_bucket_owner="s3BucketOwner",
            s3_key_prefix="s3KeyPrefix"
        )
    ),
    key_schema=[dynamodb_mixins.CfnTablePropsMixin.KeySchemaProperty(
        attribute_name="attributeName",
        key_type="keyType"
    )],
    kinesis_stream_specification=dynamodb_mixins.CfnTablePropsMixin.KinesisStreamSpecificationProperty(
        approximate_creation_date_time_precision="approximateCreationDateTimePrecision",
        stream_arn="streamArn"
    ),
    local_secondary_indexes=[dynamodb_mixins.CfnTablePropsMixin.LocalSecondaryIndexProperty(
        index_name="indexName",
        key_schema=[dynamodb_mixins.CfnTablePropsMixin.KeySchemaProperty(
            attribute_name="attributeName",
            key_type="keyType"
        )],
        projection=dynamodb_mixins.CfnTablePropsMixin.ProjectionProperty(
            non_key_attributes=["nonKeyAttributes"],
            projection_type="projectionType"
        )
    )],
    on_demand_throughput=dynamodb_mixins.CfnTablePropsMixin.OnDemandThroughputProperty(
        max_read_request_units=123,
        max_write_request_units=123
    ),
    point_in_time_recovery_specification=dynamodb_mixins.CfnTablePropsMixin.PointInTimeRecoverySpecificationProperty(
        point_in_time_recovery_enabled=False,
        recovery_period_in_days=123
    ),
    provisioned_throughput=dynamodb_mixins.CfnTablePropsMixin.ProvisionedThroughputProperty(
        read_capacity_units=123,
        write_capacity_units=123
    ),
    resource_policy=dynamodb_mixins.CfnTablePropsMixin.ResourcePolicyProperty(
        policy_document=policy_document
    ),
    sse_specification=dynamodb_mixins.CfnTablePropsMixin.SSESpecificationProperty(
        kms_master_key_id="kmsMasterKeyId",
        sse_enabled=False,
        sse_type="sseType"
    ),
    stream_specification=dynamodb_mixins.CfnTablePropsMixin.StreamSpecificationProperty(
        resource_policy=dynamodb_mixins.CfnTablePropsMixin.ResourcePolicyProperty(
            policy_document=policy_document
        ),
        stream_view_type="streamViewType"
    ),
    table_class="tableClass",
    table_name="tableName",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    time_to_live_specification=dynamodb_mixins.CfnTablePropsMixin.TimeToLiveSpecificationProperty(
        attribute_name="attributeName",
        enabled=False
    ),
    warm_throughput=dynamodb_mixins.CfnTablePropsMixin.WarmThroughputProperty(
        read_units_per_second=123,
        write_units_per_second=123
    )
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::DynamoDB::Table.

Parameters:
  • props (Union[CfnTableMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['attributeDefinitions', 'billingMode', 'contributorInsightsSpecification', 'deletionProtectionEnabled', 'globalSecondaryIndexes', 'importSourceSpecification', 'keySchema', 'kinesisStreamSpecification', 'localSecondaryIndexes', 'onDemandThroughput', 'pointInTimeRecoverySpecification', 'provisionedThroughput', 'resourcePolicy', 'sseSpecification', 'streamSpecification', 'tableClass', 'tableName', 'tags', 'timeToLiveSpecification', 'warmThroughput']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

AttributeDefinitionProperty

class CfnTablePropsMixin.AttributeDefinitionProperty(*, attribute_name=None, attribute_type=None)

Bases: object

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

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

  • attribute_type (Optional[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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

attribute_definition_property = dynamodb_mixins.CfnTablePropsMixin.AttributeDefinitionProperty(
    attribute_name="attributeName",
    attribute_type="attributeType"
)

Attributes

attribute_name

A name for the attribute.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-attributedefinition.html#cfn-dynamodb-table-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

See:

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

Type:

The data type for the attribute, where

ContributorInsightsSpecificationProperty

class CfnTablePropsMixin.ContributorInsightsSpecificationProperty(*, enabled=None, mode=None)

Bases: object

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

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

  • mode (Optional[str]) – Specifies the CloudWatch Contributor Insights mode for a table. Valid values are ACCESSED_AND_THROTTLED_KEYS (tracks all access and throttled events) or THROTTLED_KEYS (tracks only throttled events). This setting determines what type of contributor insights data is collected for the table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

contributor_insights_specification_property = dynamodb_mixins.CfnTablePropsMixin.ContributorInsightsSpecificationProperty(
    enabled=False,
    mode="mode"
)

Attributes

enabled

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

See:

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

mode

Specifies the CloudWatch Contributor Insights mode for a table.

Valid values are ACCESSED_AND_THROTTLED_KEYS (tracks all access and throttled events) or THROTTLED_KEYS (tracks only throttled events). This setting determines what type of contributor insights data is collected for the table.

See:

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

CsvProperty

class CfnTablePropsMixin.CsvProperty(*, delimiter=None, header_list=None)

Bases: object

The options for imported source files in CSV format.

The values are Delimiter and HeaderList.

Parameters:
  • delimiter (Optional[str]) – The delimiter used for separating items in the CSV file being imported.

  • header_list (Optional[Sequence[str]]) – List of the headers used to specify a common header for all source CSV files being imported. If this field is specified then the first line of each CSV file is treated as data instead of the header. If this field is not specified the the first line of each CSV file is treated as the header.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-csv.html

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.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

csv_property = dynamodb_mixins.CfnTablePropsMixin.CsvProperty(
    delimiter="delimiter",
    header_list=["headerList"]
)

Attributes

delimiter

The delimiter used for separating items in the CSV file being imported.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-csv.html#cfn-dynamodb-table-csv-delimiter

header_list

List of the headers used to specify a common header for all source CSV files being imported.

If this field is specified then the first line of each CSV file is treated as data instead of the header. If this field is not specified the the first line of each CSV file is treated as the header.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-csv.html#cfn-dynamodb-table-csv-headerlist

GlobalSecondaryIndexProperty

class CfnTablePropsMixin.GlobalSecondaryIndexProperty(*, contributor_insights_specification=None, index_name=None, key_schema=None, on_demand_throughput=None, projection=None, provisioned_throughput=None, warm_throughput=None)

Bases: object

Represents the properties of a global secondary index.

Parameters:
  • contributor_insights_specification (Union[IResolvable, ContributorInsightsSpecificationProperty, Dict[str, Any], None]) – The settings used to specify whether to enable CloudWatch Contributor Insights for the global table and define which events to monitor.

  • index_name (Optional[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]]], None]) – 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.

  • on_demand_throughput (Union[IResolvable, OnDemandThroughputProperty, Dict[str, Any], None]) – The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both. You must use either OnDemandThroughput or ProvisionedThroughput based on your table’s capacity mode.

  • projection (Union[IResolvable, ProjectionProperty, Dict[str, Any], None]) – 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.

  • provisioned_throughput (Union[IResolvable, ProvisionedThroughputProperty, Dict[str, Any], None]) – Represents the provisioned throughput settings for the specified global secondary index. You must use either OnDemandThroughput or ProvisionedThroughput based on your table’s capacity mode. For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

  • warm_throughput (Union[IResolvable, WarmThroughputProperty, Dict[str, Any], None]) – Represents the warm throughput value (in read units per second and write units per second) for the specified secondary index. If you use this parameter, you must specify ReadUnitsPerSecond , WriteUnitsPerSecond , or both.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

global_secondary_index_property = dynamodb_mixins.CfnTablePropsMixin.GlobalSecondaryIndexProperty(
    contributor_insights_specification=dynamodb_mixins.CfnTablePropsMixin.ContributorInsightsSpecificationProperty(
        enabled=False,
        mode="mode"
    ),
    index_name="indexName",
    key_schema=[dynamodb_mixins.CfnTablePropsMixin.KeySchemaProperty(
        attribute_name="attributeName",
        key_type="keyType"
    )],
    on_demand_throughput=dynamodb_mixins.CfnTablePropsMixin.OnDemandThroughputProperty(
        max_read_request_units=123,
        max_write_request_units=123
    ),
    projection=dynamodb_mixins.CfnTablePropsMixin.ProjectionProperty(
        non_key_attributes=["nonKeyAttributes"],
        projection_type="projectionType"
    ),
    provisioned_throughput=dynamodb_mixins.CfnTablePropsMixin.ProvisionedThroughputProperty(
        read_capacity_units=123,
        write_capacity_units=123
    ),
    warm_throughput=dynamodb_mixins.CfnTablePropsMixin.WarmThroughputProperty(
        read_units_per_second=123,
        write_units_per_second=123
    )
)

Attributes

contributor_insights_specification

The settings used to specify whether to enable CloudWatch Contributor Insights for the global table and define which events to monitor.

See:

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

index_name

The name of the global secondary index.

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-globalsecondaryindex.html#cfn-dynamodb-table-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.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-globalsecondaryindex.html#cfn-dynamodb-table-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

on_demand_throughput

The maximum number of read and write units for the specified global secondary index.

If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both. You must use either OnDemandThroughput or ProvisionedThroughput based on your table’s capacity mode.

See:

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

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.

See:

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

provisioned_throughput

Represents the provisioned throughput settings for the specified global secondary index.

You must use either OnDemandThroughput or ProvisionedThroughput based on your table’s capacity mode.

For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

See:

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

warm_throughput

Represents the warm throughput value (in read units per second and write units per second) for the specified secondary index.

If you use this parameter, you must specify ReadUnitsPerSecond , WriteUnitsPerSecond , or both.

See:

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

ImportSourceSpecificationProperty

class CfnTablePropsMixin.ImportSourceSpecificationProperty(*, input_compression_type=None, input_format=None, input_format_options=None, s3_bucket_source=None)

Bases: object

Specifies the properties of data being imported from the S3 bucket source to the table.

Parameters:
  • input_compression_type (Optional[str]) – Type of compression to be used on the input coming from the imported table.

  • input_format (Optional[str]) – The format of the source data. Valid values for ImportFormat are CSV , DYNAMODB_JSON or ION .

  • input_format_options (Union[IResolvable, InputFormatOptionsProperty, Dict[str, Any], None]) – Additional properties that specify how the input is formatted,.

  • s3_bucket_source (Union[IResolvable, S3BucketSourceProperty, Dict[str, Any], None]) – The S3 bucket that provides the source for the import.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html

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.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

import_source_specification_property = dynamodb_mixins.CfnTablePropsMixin.ImportSourceSpecificationProperty(
    input_compression_type="inputCompressionType",
    input_format="inputFormat",
    input_format_options=dynamodb_mixins.CfnTablePropsMixin.InputFormatOptionsProperty(
        csv=dynamodb_mixins.CfnTablePropsMixin.CsvProperty(
            delimiter="delimiter",
            header_list=["headerList"]
        )
    ),
    s3_bucket_source=dynamodb_mixins.CfnTablePropsMixin.S3BucketSourceProperty(
        s3_bucket="s3Bucket",
        s3_bucket_owner="s3BucketOwner",
        s3_key_prefix="s3KeyPrefix"
    )
)

Attributes

input_compression_type

Type of compression to be used on the input coming from the imported table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html#cfn-dynamodb-table-importsourcespecification-inputcompressiontype

input_format

The format of the source data.

Valid values for ImportFormat are CSV , DYNAMODB_JSON or ION .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html#cfn-dynamodb-table-importsourcespecification-inputformat

input_format_options

Additional properties that specify how the input is formatted,.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html#cfn-dynamodb-table-importsourcespecification-inputformatoptions

s3_bucket_source

The S3 bucket that provides the source for the import.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html#cfn-dynamodb-table-importsourcespecification-s3bucketsource

InputFormatOptionsProperty

class CfnTablePropsMixin.InputFormatOptionsProperty(*, csv=None)

Bases: object

The format options for the data that was imported into the target table.

There is one value, CsvOption.

Parameters:

csv (Union[IResolvable, CsvProperty, Dict[str, Any], None]) – The options for imported source files in CSV format. The values are Delimiter and HeaderList.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-inputformatoptions.html

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.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

input_format_options_property = dynamodb_mixins.CfnTablePropsMixin.InputFormatOptionsProperty(
    csv=dynamodb_mixins.CfnTablePropsMixin.CsvProperty(
        delimiter="delimiter",
        header_list=["headerList"]
    )
)

Attributes

csv

The options for imported source files in CSV format.

The values are Delimiter and HeaderList.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-inputformatoptions.html#cfn-dynamodb-table-inputformatoptions-csv

KeySchemaProperty

class CfnTablePropsMixin.KeySchemaProperty(*, attribute_name=None, key_type=None)

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 (Optional[str]) – The name of a key attribute.

  • key_type (Optional[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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

key_schema_property = dynamodb_mixins.CfnTablePropsMixin.KeySchemaProperty(
    attribute_name="attributeName",
    key_type="keyType"
)

Attributes

attribute_name

The name of a key attribute.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-keyschema.html#cfn-dynamodb-table-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.

See:

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

Type:

The role that this key attribute will assume

KinesisStreamSpecificationProperty

class CfnTablePropsMixin.KinesisStreamSpecificationProperty(*, approximate_creation_date_time_precision=None, stream_arn=None)

Bases: object

The Kinesis Data Streams configuration for the specified table.

Parameters:
  • approximate_creation_date_time_precision (Optional[str]) – The precision for the time and date that the stream was created.

  • stream_arn (Optional[str]) – The ARN for a specific Kinesis data stream. Length Constraints: Minimum length of 37. Maximum length of 1024.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

kinesis_stream_specification_property = dynamodb_mixins.CfnTablePropsMixin.KinesisStreamSpecificationProperty(
    approximate_creation_date_time_precision="approximateCreationDateTimePrecision",
    stream_arn="streamArn"
)

Attributes

approximate_creation_date_time_precision

The precision for the time and date that the stream was created.

See:

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

stream_arn

The ARN for a specific Kinesis data stream.

Length Constraints: Minimum length of 37. Maximum length of 1024.

See:

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

LocalSecondaryIndexProperty

class CfnTablePropsMixin.LocalSecondaryIndexProperty(*, index_name=None, key_schema=None, projection=None)

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 (Optional[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]]], None]) – 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], None]) – 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

local_secondary_index_property = dynamodb_mixins.CfnTablePropsMixin.LocalSecondaryIndexProperty(
    index_name="indexName",
    key_schema=[dynamodb_mixins.CfnTablePropsMixin.KeySchemaProperty(
        attribute_name="attributeName",
        key_type="keyType"
    )],
    projection=dynamodb_mixins.CfnTablePropsMixin.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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-localsecondaryindex.html#cfn-dynamodb-table-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.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-localsecondaryindex.html#cfn-dynamodb-table-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.

See:

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

OnDemandThroughputProperty

class CfnTablePropsMixin.OnDemandThroughputProperty(*, max_read_request_units=None, max_write_request_units=None)

Bases: object

Sets the maximum number of read and write units for the specified on-demand table.

If you use this property, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

Parameters:
  • max_read_request_units (Union[int, float, None]) – Maximum number of read request units for the specified table. To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

  • max_write_request_units (Union[int, float, None]) – Maximum number of write request units for the specified table. To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-ondemandthroughput.html

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.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

on_demand_throughput_property = dynamodb_mixins.CfnTablePropsMixin.OnDemandThroughputProperty(
    max_read_request_units=123,
    max_write_request_units=123
)

Attributes

max_read_request_units

Maximum number of read request units for the specified table.

To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-ondemandthroughput.html#cfn-dynamodb-table-ondemandthroughput-maxreadrequestunits

max_write_request_units

Maximum number of write request units for the specified table.

To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-ondemandthroughput.html#cfn-dynamodb-table-ondemandthroughput-maxwriterequestunits

PointInTimeRecoverySpecificationProperty

class CfnTablePropsMixin.PointInTimeRecoverySpecificationProperty(*, point_in_time_recovery_enabled=None, recovery_period_in_days=None)

Bases: object

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.

  • recovery_period_in_days (Union[int, float, None]) – The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional. If no value is provided, the value will default to 35.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

point_in_time_recovery_specification_property = dynamodb_mixins.CfnTablePropsMixin.PointInTimeRecoverySpecificationProperty(
    point_in_time_recovery_enabled=False,
    recovery_period_in_days=123
)

Attributes

point_in_time_recovery_enabled

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

See:

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

recovery_period_in_days

The number of preceding days for which continuous backups are taken and maintained.

Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional. If no value is provided, the value will default to 35.

See:

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

ProjectionProperty

class CfnTablePropsMixin.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 global and local secondary indexes, the total count of NonKeyAttributes summed across all of the 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. This limit only applies when you specify the ProjectionType of INCLUDE . You still can specify the ProjectionType of ALL to project all attributes from the source table, even if the table has more than 100 attributes.

  • 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. When using the DynamoDB console, ALL is selected by default.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

projection_property = dynamodb_mixins.CfnTablePropsMixin.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 global and local secondary indexes, the total count of NonKeyAttributes summed across all of the 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. This limit only applies when you specify the ProjectionType of INCLUDE . You still can specify the ProjectionType of ALL to project all attributes from the source table, even if the table has more than 100 attributes.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-projection.html#cfn-dynamodb-table-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.

When using the DynamoDB console, ALL is selected by default.

See:

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

Type:

The set of attributes that are projected into the index

ProvisionedThroughputProperty

class CfnTablePropsMixin.ProvisionedThroughputProperty(*, read_capacity_units=None, write_capacity_units=None)

Bases: object

Throughput for the specified table, which consists of values for ReadCapacityUnits and WriteCapacityUnits .

For more information about the contents of a provisioned throughput structure, see Amazon DynamoDB Table ProvisionedThroughput .

Parameters:
  • read_capacity_units (Union[int, float, None]) – The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide . If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

  • write_capacity_units (Union[int, float, None]) –

    The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide . If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-provisionedthroughput.html

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.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

provisioned_throughput_property = dynamodb_mixins.CfnTablePropsMixin.ProvisionedThroughputProperty(
    read_capacity_units=123,
    write_capacity_units=123
)

Attributes

read_capacity_units

The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException .

For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .

If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

See:

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

write_capacity_units

The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException .

For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .

If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-provisionedthroughput.html#cfn-dynamodb-table-provisionedthroughput-writecapacityunits

ResourcePolicyProperty

class CfnTablePropsMixin.ResourcePolicyProperty(*, policy_document=None)

Bases: object

Creates or updates a resource-based policy document that contains the permissions for DynamoDB resources, such as a table, its indexes, and stream.

Resource-based policies let you define access permissions by specifying who has access to each resource, and the actions they are allowed to perform on each resource.

In a CloudFormation template, you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to DynamoDB . For more information about resource-based policies, see Using resource-based policies for DynamoDB and Resource-based policy examples .

While defining resource-based policies in your CloudFormation templates, the following considerations apply:

  • The maximum size supported for a resource-based policy document in JSON format is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit.

  • Resource-based policies don’t support drift detection . If you update a policy outside of the CloudFormation stack template, you’ll need to update the CloudFormation stack with the changes.

  • Resource-based policies don’t support out-of-band changes. If you add, update, or delete a policy outside of the CloudFormation template, the change won’t be overwritten if there are no changes to the policy within the template.

For example, say that your template contains a resource-based policy, which you later update outside of the template. If you don’t make any changes to the policy in the template, the updated policy in DynamoDB won’t be synced with the policy in the template.

Conversely, say that your template doesn’t contain a resource-based policy, but you add a policy outside of the template. This policy won’t be removed from DynamoDB as long as you don’t add it to the template. When you add a policy to the template and update the stack, the existing policy in DynamoDB will be updated to match the one defined in the template.

For a full list of all considerations, see Resource-based policy considerations .

Parameters:

policy_document (Any) –

A resource-based policy document that contains permissions to add to the specified DynamoDB table, index, or both. In a CloudFormation template, you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to DynamoDB . For more information about resource-based policies, see Using resource-based policies for DynamoDB and Resource-based policy examples .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-resourcepolicy.html

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.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

# policy_document: Any

resource_policy_property = dynamodb_mixins.CfnTablePropsMixin.ResourcePolicyProperty(
    policy_document=policy_document
)

Attributes

policy_document

A resource-based policy document that contains permissions to add to the specified DynamoDB table, index, or both.

In a CloudFormation template, you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to DynamoDB . For more information about resource-based policies, see Using resource-based policies for DynamoDB and Resource-based policy examples .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-resourcepolicy.html#cfn-dynamodb-table-resourcepolicy-policydocument

S3BucketSourceProperty

class CfnTablePropsMixin.S3BucketSourceProperty(*, s3_bucket=None, s3_bucket_owner=None, s3_key_prefix=None)

Bases: object

The S3 bucket that is being imported from.

Parameters:
  • s3_bucket (Optional[str]) – The S3 bucket that is being imported from.

  • s3_bucket_owner (Optional[str]) – The account number of the S3 bucket that is being imported from. If the bucket is owned by the requester this is optional.

  • s3_key_prefix (Optional[str]) – The key prefix shared by all S3 Objects that are being imported.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-s3bucketsource.html

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.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

s3_bucket_source_property = dynamodb_mixins.CfnTablePropsMixin.S3BucketSourceProperty(
    s3_bucket="s3Bucket",
    s3_bucket_owner="s3BucketOwner",
    s3_key_prefix="s3KeyPrefix"
)

Attributes

s3_bucket

The S3 bucket that is being imported from.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-s3bucketsource.html#cfn-dynamodb-table-s3bucketsource-s3bucket

s3_bucket_owner

The account number of the S3 bucket that is being imported from.

If the bucket is owned by the requester this is optional.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-s3bucketsource.html#cfn-dynamodb-table-s3bucketsource-s3bucketowner

s3_key_prefix

The key prefix shared by all S3 Objects that are being imported.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-s3bucketsource.html#cfn-dynamodb-table-s3bucketsource-s3keyprefix

SSESpecificationProperty

class CfnTablePropsMixin.SSESpecificationProperty(*, kms_master_key_id=None, sse_enabled=None, sse_type=None)

Bases: object

Represents the settings used to enable server-side encryption.

Parameters:
  • kms_master_key_id (Optional[str]) – The AWS key that should be used for the AWS 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 .

  • sse_enabled (Union[bool, IResolvable, None]) – Indicates whether server-side encryption is done 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 charges apply). If disabled (false) or not specified, server-side encryption is set to AWS owned key.

  • 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 ( AWS charges apply).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

s_sESpecification_property = dynamodb_mixins.CfnTablePropsMixin.SSESpecificationProperty(
    kms_master_key_id="kmsMasterKeyId",
    sse_enabled=False,
    sse_type="sseType"
)

Attributes

kms_master_key_id

The AWS key that should be used for the AWS 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 .

See:

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

sse_enabled

Indicates whether server-side encryption is done 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 charges apply). If disabled (false) or not specified, server-side encryption is set to AWS owned key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-ssespecification.html#cfn-dynamodb-table-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 ( AWS charges apply).

See:

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

Type:

Server-side encryption type. The only supported value is

StreamSpecificationProperty

class CfnTablePropsMixin.StreamSpecificationProperty(*, resource_policy=None, stream_view_type=None)

Bases: object

Represents the DynamoDB Streams configuration for a table in DynamoDB.

Parameters:
  • resource_policy (Union[IResolvable, ResourcePolicyProperty, Dict[str, Any], None]) –

    Creates or updates a resource-based policy document that contains the permissions for DynamoDB resources, such as a table’s streams. Resource-based policies let you define access permissions by specifying who has access to each resource, and the actions they are allowed to perform on each resource. .. epigraph:: When you remove the StreamSpecification property from the template, DynamoDB disables the stream but retains any attached resource policy until the stream is deleted after 24 hours. When you modify the StreamViewType property, DynamoDB creates a new stream and retains the old stream’s resource policy. The old stream and its resource policy are deleted after the 24-hour retention period. In a CloudFormation template, you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to DynamoDB . For more information about resource-based policies, see Using resource-based policies for DynamoDB and Resource-based policy examples .

  • stream_view_type (Optional[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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

# policy_document: Any

stream_specification_property = dynamodb_mixins.CfnTablePropsMixin.StreamSpecificationProperty(
    resource_policy=dynamodb_mixins.CfnTablePropsMixin.ResourcePolicyProperty(
        policy_document=policy_document
    ),
    stream_view_type="streamViewType"
)

Attributes

resource_policy

Creates or updates a resource-based policy document that contains the permissions for DynamoDB resources, such as a table’s streams.

Resource-based policies let you define access permissions by specifying who has access to each resource, and the actions they are allowed to perform on each resource. .. epigraph:

When you remove the ``StreamSpecification`` property from the template, DynamoDB disables the stream but retains any attached resource policy until the stream is deleted after 24 hours. When you modify the ``StreamViewType`` property, DynamoDB creates a new stream and retains the old stream's resource policy. The old stream and its resource policy are deleted after the 24-hour retention period.

In a CloudFormation template, you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to DynamoDB . For more information about resource-based policies, see Using resource-based policies for DynamoDB and Resource-based policy examples .

See:

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

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.

See:

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

TimeToLiveSpecificationProperty

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

Bases: object

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

Parameters:
  • attribute_name (Optional[str]) – The name of the TTL attribute used to store the expiration time for items in the table. .. epigraph:: - The AttributeName property is required when enabling the TTL, or when TTL is already enabled. - To update this property, you must first disable TTL and then enable TTL with the new attribute name.

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-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.
from aws_cdk.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

time_to_live_specification_property = dynamodb_mixins.CfnTablePropsMixin.TimeToLiveSpecificationProperty(
    attribute_name="attributeName",
    enabled=False
)

Attributes

attribute_name

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

  • The AttributeName property is required when enabling the TTL, or when TTL is already enabled.

  • To update this property, you must first disable TTL and then enable TTL with the new attribute name.

See:

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

enabled

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

See:

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

WarmThroughputProperty

class CfnTablePropsMixin.WarmThroughputProperty(*, read_units_per_second=None, write_units_per_second=None)

Bases: object

Provides visibility into the number of read and write operations your table or secondary index can instantaneously support.

The settings can be modified using the UpdateTable operation to meet the throughput requirements of an upcoming peak event.

Parameters:
  • read_units_per_second (Union[int, float, None]) – Represents the number of read operations your base table can instantaneously support.

  • write_units_per_second (Union[int, float, None]) – Represents the number of write operations your base table can instantaneously support.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-warmthroughput.html

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.mixins_preview.aws_dynamodb import mixins as dynamodb_mixins

warm_throughput_property = dynamodb_mixins.CfnTablePropsMixin.WarmThroughputProperty(
    read_units_per_second=123,
    write_units_per_second=123
)

Attributes

read_units_per_second

Represents the number of read operations your base table can instantaneously support.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-warmthroughput.html#cfn-dynamodb-table-warmthroughput-readunitspersecond

write_units_per_second

Represents the number of write operations your base table can instantaneously support.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-warmthroughput.html#cfn-dynamodb-table-warmthroughput-writeunitspersecond