Skip to content
v2.278.0

CfnTableProps Struct ​

Properties for defining a CfnTable.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_dynamodb as dynamodb } from 'aws-cdk-lib';

declare const policyDocument: any;
const cfnTableProps: dynamodb.CfnTableProps = {
  keySchema: [{
    attributeName: 'attributeName',
    keyType: 'keyType',
  }],

  // the properties below are optional
  attributeDefinitions: [{
    attributeName: 'attributeName',
    attributeType: 'attributeType',
  }],
  billingMode: 'billingMode',
  contributorInsightsSpecification: {
    enabled: false,

    // the properties below are optional
    mode: 'mode',
  },
  deletionProtectionEnabled: false,
  globalSecondaryIndexes: [{
    indexName: 'indexName',
    keySchema: [{
      attributeName: 'attributeName',
      keyType: 'keyType',
    }],
    projection: {
      nonKeyAttributes: ['nonKeyAttributes'],
      projectionType: 'projectionType',
    },

    // the properties below are optional
    contributorInsightsSpecification: {
      enabled: false,

      // the properties below are optional
      mode: 'mode',
    },
    onDemandThroughput: {
      maxReadRequestUnits: 123,
      maxWriteRequestUnits: 123,
    },
    provisionedThroughput: {
      readCapacityUnits: 123,
      writeCapacityUnits: 123,
    },
    warmThroughput: {
      readUnitsPerSecond: 123,
      writeUnitsPerSecond: 123,
    },
  }],
  importSourceSpecification: {
    inputFormat: 'inputFormat',
    s3BucketSource: {
      s3Bucket: 's3Bucket',

      // the properties below are optional
      s3BucketOwner: 's3BucketOwner',
      s3KeyPrefix: 's3KeyPrefix',
    },

    // the properties below are optional
    inputCompressionType: 'inputCompressionType',
    inputFormatOptions: {
      csv: {
        delimiter: 'delimiter',
        headerList: ['headerList'],
      },
    },
  },
  kinesisStreamSpecification: {
    streamArn: 'streamArn',

    // the properties below are optional
    approximateCreationDateTimePrecision: 'approximateCreationDateTimePrecision',
  },
  localSecondaryIndexes: [{
    indexName: 'indexName',
    keySchema: [{
      attributeName: 'attributeName',
      keyType: 'keyType',
    }],
    projection: {
      nonKeyAttributes: ['nonKeyAttributes'],
      projectionType: 'projectionType',
    },
  }],
  onDemandThroughput: {
    maxReadRequestUnits: 123,
    maxWriteRequestUnits: 123,
  },
  pointInTimeRecoverySpecification: {
    pointInTimeRecoveryEnabled: false,
    recoveryPeriodInDays: 123,
  },
  provisionedThroughput: {
    readCapacityUnits: 123,
    writeCapacityUnits: 123,
  },
  resourcePolicy: {
    policyDocument: policyDocument,
  },
  sseSpecification: {
    sseEnabled: false,

    // the properties below are optional
    kmsMasterKeyId: 'kmsMasterKeyId',
    sseType: 'sseType',
  },
  streamSpecification: {
    streamViewType: 'streamViewType',

    // the properties below are optional
    resourcePolicy: {
      policyDocument: policyDocument,
    },
    tags: [{
      key: 'key',
      value: 'value',
    }],
  },
  tableClass: 'tableClass',
  tableName: 'tableName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  timeToLiveSpecification: {
    enabled: false,

    // the properties below are optional
    attributeName: 'attributeName',
  },
  vectorIndexes: [{
    dimensions: 123,
    distanceFunction: 'distanceFunction',
    indexName: 'indexName',
    projection: {
      nonKeyAttributes: ['nonKeyAttributes'],
      projectionType: 'projectionType',
    },
    vectorAttribute: {
      attributeName: 'attributeName',
    },

    // the properties below are optional
    searchSchema: [{
      attributeName: 'attributeName',
      searchSchemaElementType: 'searchSchemaElementType',
    }],
  }],
  warmThroughput: {
    readUnitsPerSecond: 123,
    writeUnitsPerSecond: 123,
  },
};
python
from aws_cdk import CfnTag, CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_dynamodb as dynamodb

# policy_document: Any

cfn_table_props = dynamodb.CfnTableProps(
    key_schema=[dynamodb.CfnTable.KeySchemaProperty(
        attribute_name="attributeName",
        key_type="keyType"
    )],

    # the properties below are optional
    attribute_definitions=[dynamodb.CfnTable.AttributeDefinitionProperty(
        attribute_name="attributeName",
        attribute_type="attributeType"
    )],
    billing_mode="billingMode",
    contributor_insights_specification=dynamodb.CfnTable.ContributorInsightsSpecificationProperty(
        enabled=False,

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

        # the properties below are optional
        contributor_insights_specification=dynamodb.CfnTable.ContributorInsightsSpecificationProperty(
            enabled=False,

            # the properties below are optional
            mode="mode"
        ),
        on_demand_throughput=dynamodb.CfnTable.OnDemandThroughputProperty(
            max_read_request_units=123,
            max_write_request_units=123
        ),
        provisioned_throughput=dynamodb.CfnTable.ProvisionedThroughputProperty(
            read_capacity_units=123,
            write_capacity_units=123
        ),
        warm_throughput=dynamodb.CfnTable.WarmThroughputProperty(
            read_units_per_second=123,
            write_units_per_second=123
        )
    )],
    import_source_specification=dynamodb.CfnTable.ImportSourceSpecificationProperty(
        input_format="inputFormat",
        s3_bucket_source=dynamodb.CfnTable.S3BucketSourceProperty(
            s3_bucket="s3Bucket",

            # the properties below are optional
            s3_bucket_owner="s3BucketOwner",
            s3_key_prefix="s3KeyPrefix"
        ),

        # the properties below are optional
        input_compression_type="inputCompressionType",
        input_format_options=dynamodb.CfnTable.InputFormatOptionsProperty(
            csv=dynamodb.CfnTable.CsvProperty(
                delimiter="delimiter",
                header_list=["headerList"]
            )
        )
    ),
    kinesis_stream_specification=dynamodb.CfnTable.KinesisStreamSpecificationProperty(
        stream_arn="streamArn",

        # the properties below are optional
        approximate_creation_date_time_precision="approximateCreationDateTimePrecision"
    ),
    local_secondary_indexes=[dynamodb.CfnTable.LocalSecondaryIndexProperty(
        index_name="indexName",
        key_schema=[dynamodb.CfnTable.KeySchemaProperty(
            attribute_name="attributeName",
            key_type="keyType"
        )],
        projection=dynamodb.CfnTable.ProjectionProperty(
            non_key_attributes=["nonKeyAttributes"],
            projection_type="projectionType"
        )
    )],
    on_demand_throughput=dynamodb.CfnTable.OnDemandThroughputProperty(
        max_read_request_units=123,
        max_write_request_units=123
    ),
    point_in_time_recovery_specification=dynamodb.CfnTable.PointInTimeRecoverySpecificationProperty(
        point_in_time_recovery_enabled=False,
        recovery_period_in_days=123
    ),
    provisioned_throughput=dynamodb.CfnTable.ProvisionedThroughputProperty(
        read_capacity_units=123,
        write_capacity_units=123
    ),
    resource_policy=dynamodb.CfnTable.ResourcePolicyProperty(
        policy_document=policy_document
    ),
    sse_specification=dynamodb.CfnTable.SSESpecificationProperty(
        sse_enabled=False,

        # the properties below are optional
        kms_master_key_id="kmsMasterKeyId",
        sse_type="sseType"
    ),
    stream_specification=dynamodb.CfnTable.StreamSpecificationProperty(
        stream_view_type="streamViewType",

        # the properties below are optional
        resource_policy=dynamodb.CfnTable.ResourcePolicyProperty(
            policy_document=policy_document
        ),
        tags=[CfnTag(
            key="key",
            value="value"
        )]
    ),
    table_class="tableClass",
    table_name="tableName",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    time_to_live_specification=dynamodb.CfnTable.TimeToLiveSpecificationProperty(
        enabled=False,

        # the properties below are optional
        attribute_name="attributeName"
    ),
    vector_indexes=[dynamodb.CfnTable.VectorIndexProperty(
        dimensions=123,
        distance_function="distanceFunction",
        index_name="indexName",
        projection=dynamodb.CfnTable.ProjectionProperty(
            non_key_attributes=["nonKeyAttributes"],
            projection_type="projectionType"
        ),
        vector_attribute=dynamodb.CfnTable.VectorAttributeProperty(
            attribute_name="attributeName"
        ),

        # the properties below are optional
        search_schema=[dynamodb.CfnTable.SearchSchemaElementProperty(
            attribute_name="attributeName",
            search_schema_element_type="searchSchemaElementType"
        )]
    )],
    warm_throughput=dynamodb.CfnTable.WarmThroughputProperty(
        read_units_per_second=123,
        write_units_per_second=123
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.dynamodb.*;

Object policyDocument;

CfnTableProps cfnTableProps = CfnTableProps.builder()
        .keySchema(List.of(KeySchemaProperty.builder()
                .attributeName("attributeName")
                .keyType("keyType")
                .build()))

        // the properties below are optional
        .attributeDefinitions(List.of(AttributeDefinitionProperty.builder()
                .attributeName("attributeName")
                .attributeType("attributeType")
                .build()))
        .billingMode("billingMode")
        .contributorInsightsSpecification(ContributorInsightsSpecificationProperty.builder()
                .enabled(false)

                // the properties below are optional
                .mode("mode")
                .build())
        .deletionProtectionEnabled(false)
        .globalSecondaryIndexes(List.of(GlobalSecondaryIndexProperty.builder()
                .indexName("indexName")
                .keySchema(List.of(KeySchemaProperty.builder()
                        .attributeName("attributeName")
                        .keyType("keyType")
                        .build()))
                .projection(ProjectionProperty.builder()
                        .nonKeyAttributes(List.of("nonKeyAttributes"))
                        .projectionType("projectionType")
                        .build())

                // the properties below are optional
                .contributorInsightsSpecification(ContributorInsightsSpecificationProperty.builder()
                        .enabled(false)

                        // the properties below are optional
                        .mode("mode")
                        .build())
                .onDemandThroughput(OnDemandThroughputProperty.builder()
                        .maxReadRequestUnits(123)
                        .maxWriteRequestUnits(123)
                        .build())
                .provisionedThroughput(ProvisionedThroughputProperty.builder()
                        .readCapacityUnits(123)
                        .writeCapacityUnits(123)
                        .build())
                .warmThroughput(WarmThroughputProperty.builder()
                        .readUnitsPerSecond(123)
                        .writeUnitsPerSecond(123)
                        .build())
                .build()))
        .importSourceSpecification(ImportSourceSpecificationProperty.builder()
                .inputFormat("inputFormat")
                .s3BucketSource(S3BucketSourceProperty.builder()
                        .s3Bucket("s3Bucket")

                        // the properties below are optional
                        .s3BucketOwner("s3BucketOwner")
                        .s3KeyPrefix("s3KeyPrefix")
                        .build())

                // the properties below are optional
                .inputCompressionType("inputCompressionType")
                .inputFormatOptions(InputFormatOptionsProperty.builder()
                        .csv(CsvProperty.builder()
                                .delimiter("delimiter")
                                .headerList(List.of("headerList"))
                                .build())
                        .build())
                .build())
        .kinesisStreamSpecification(KinesisStreamSpecificationProperty.builder()
                .streamArn("streamArn")

                // the properties below are optional
                .approximateCreationDateTimePrecision("approximateCreationDateTimePrecision")
                .build())
        .localSecondaryIndexes(List.of(LocalSecondaryIndexProperty.builder()
                .indexName("indexName")
                .keySchema(List.of(KeySchemaProperty.builder()
                        .attributeName("attributeName")
                        .keyType("keyType")
                        .build()))
                .projection(ProjectionProperty.builder()
                        .nonKeyAttributes(List.of("nonKeyAttributes"))
                        .projectionType("projectionType")
                        .build())
                .build()))
        .onDemandThroughput(OnDemandThroughputProperty.builder()
                .maxReadRequestUnits(123)
                .maxWriteRequestUnits(123)
                .build())
        .pointInTimeRecoverySpecification(PointInTimeRecoverySpecificationProperty.builder()
                .pointInTimeRecoveryEnabled(false)
                .recoveryPeriodInDays(123)
                .build())
        .provisionedThroughput(ProvisionedThroughputProperty.builder()
                .readCapacityUnits(123)
                .writeCapacityUnits(123)
                .build())
        .resourcePolicy(ResourcePolicyProperty.builder()
                .policyDocument(policyDocument)
                .build())
        .sseSpecification(SSESpecificationProperty.builder()
                .sseEnabled(false)

                // the properties below are optional
                .kmsMasterKeyId("kmsMasterKeyId")
                .sseType("sseType")
                .build())
        .streamSpecification(StreamSpecificationProperty.builder()
                .streamViewType("streamViewType")

                // the properties below are optional
                .resourcePolicy(ResourcePolicyProperty.builder()
                        .policyDocument(policyDocument)
                        .build())
                .tags(List.of(CfnTag.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .build())
        .tableClass("tableClass")
        .tableName("tableName")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .timeToLiveSpecification(TimeToLiveSpecificationProperty.builder()
                .enabled(false)

                // the properties below are optional
                .attributeName("attributeName")
                .build())
        .vectorIndexes(List.of(VectorIndexProperty.builder()
                .dimensions(123)
                .distanceFunction("distanceFunction")
                .indexName("indexName")
                .projection(ProjectionProperty.builder()
                        .nonKeyAttributes(List.of("nonKeyAttributes"))
                        .projectionType("projectionType")
                        .build())
                .vectorAttribute(VectorAttributeProperty.builder()
                        .attributeName("attributeName")
                        .build())

                // the properties below are optional
                .searchSchema(List.of(SearchSchemaElementProperty.builder()
                        .attributeName("attributeName")
                        .searchSchemaElementType("searchSchemaElementType")
                        .build()))
                .build()))
        .warmThroughput(WarmThroughputProperty.builder()
                .readUnitsPerSecond(123)
                .writeUnitsPerSecond(123)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DynamoDB;

var policyDocument;

var cfnTableProps = new CfnTableProps {
    KeySchema = new [] { new KeySchemaProperty {
        AttributeName = "attributeName",
        KeyType = "keyType"
    } },

    // the properties below are optional
    AttributeDefinitions = new [] { new AttributeDefinitionProperty {
        AttributeName = "attributeName",
        AttributeType = "attributeType"
    } },
    BillingMode = "billingMode",
    ContributorInsightsSpecification = new ContributorInsightsSpecificationProperty {
        Enabled = false,

        // the properties below are optional
        Mode = "mode"
    },
    DeletionProtectionEnabled = false,
    GlobalSecondaryIndexes = new [] { new GlobalSecondaryIndexProperty {
        IndexName = "indexName",
        KeySchema = new [] { new KeySchemaProperty {
            AttributeName = "attributeName",
            KeyType = "keyType"
        } },
        Projection = new ProjectionProperty {
            NonKeyAttributes = new [] { "nonKeyAttributes" },
            ProjectionType = "projectionType"
        },

        // the properties below are optional
        ContributorInsightsSpecification = new ContributorInsightsSpecificationProperty {
            Enabled = false,

            // the properties below are optional
            Mode = "mode"
        },
        OnDemandThroughput = new OnDemandThroughputProperty {
            MaxReadRequestUnits = 123,
            MaxWriteRequestUnits = 123
        },
        ProvisionedThroughput = new ProvisionedThroughputProperty {
            ReadCapacityUnits = 123,
            WriteCapacityUnits = 123
        },
        WarmThroughput = new WarmThroughputProperty {
            ReadUnitsPerSecond = 123,
            WriteUnitsPerSecond = 123
        }
    } },
    ImportSourceSpecification = new ImportSourceSpecificationProperty {
        InputFormat = "inputFormat",
        S3BucketSource = new S3BucketSourceProperty {
            S3Bucket = "s3Bucket",

            // the properties below are optional
            S3BucketOwner = "s3BucketOwner",
            S3KeyPrefix = "s3KeyPrefix"
        },

        // the properties below are optional
        InputCompressionType = "inputCompressionType",
        InputFormatOptions = new InputFormatOptionsProperty {
            Csv = new CsvProperty {
                Delimiter = "delimiter",
                HeaderList = new [] { "headerList" }
            }
        }
    },
    KinesisStreamSpecification = new KinesisStreamSpecificationProperty {
        StreamArn = "streamArn",

        // the properties below are optional
        ApproximateCreationDateTimePrecision = "approximateCreationDateTimePrecision"
    },
    LocalSecondaryIndexes = new [] { new LocalSecondaryIndexProperty {
        IndexName = "indexName",
        KeySchema = new [] { new KeySchemaProperty {
            AttributeName = "attributeName",
            KeyType = "keyType"
        } },
        Projection = new ProjectionProperty {
            NonKeyAttributes = new [] { "nonKeyAttributes" },
            ProjectionType = "projectionType"
        }
    } },
    OnDemandThroughput = new OnDemandThroughputProperty {
        MaxReadRequestUnits = 123,
        MaxWriteRequestUnits = 123
    },
    PointInTimeRecoverySpecification = new PointInTimeRecoverySpecificationProperty {
        PointInTimeRecoveryEnabled = false,
        RecoveryPeriodInDays = 123
    },
    ProvisionedThroughput = new ProvisionedThroughputProperty {
        ReadCapacityUnits = 123,
        WriteCapacityUnits = 123
    },
    ResourcePolicy = new ResourcePolicyProperty {
        PolicyDocument = policyDocument
    },
    SseSpecification = new SSESpecificationProperty {
        SseEnabled = false,

        // the properties below are optional
        KmsMasterKeyId = "kmsMasterKeyId",
        SseType = "sseType"
    },
    StreamSpecification = new StreamSpecificationProperty {
        StreamViewType = "streamViewType",

        // the properties below are optional
        ResourcePolicy = new ResourcePolicyProperty {
            PolicyDocument = policyDocument
        },
        Tags = new [] { new CfnTag {
            Key = "key",
            Value = "value"
        } }
    },
    TableClass = "tableClass",
    TableName = "tableName",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    TimeToLiveSpecification = new TimeToLiveSpecificationProperty {
        Enabled = false,

        // the properties below are optional
        AttributeName = "attributeName"
    },
    VectorIndexes = new [] { new VectorIndexProperty {
        Dimensions = 123,
        DistanceFunction = "distanceFunction",
        IndexName = "indexName",
        Projection = new ProjectionProperty {
            NonKeyAttributes = new [] { "nonKeyAttributes" },
            ProjectionType = "projectionType"
        },
        VectorAttribute = new VectorAttributeProperty {
            AttributeName = "attributeName"
        },

        // the properties below are optional
        SearchSchema = new [] { new SearchSchemaElementProperty {
            AttributeName = "attributeName",
            SearchSchemaElementType = "searchSchemaElementType"
        } }
    } },
    WarmThroughput = new WarmThroughputProperty {
        ReadUnitsPerSecond = 123,
        WriteUnitsPerSecond = 123
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var policyDocument interface{}

cfnTableProps := &CfnTableProps{
	KeySchema: []interface{}{
		&KeySchemaProperty{
			AttributeName: jsii.String("attributeName"),
			KeyType: jsii.String("keyType"),
		},
	},

	// the properties below are optional
	AttributeDefinitions: []interface{}{
		&AttributeDefinitionProperty{
			AttributeName: jsii.String("attributeName"),
			AttributeType: jsii.String("attributeType"),
		},
	},
	BillingMode: jsii.String("billingMode"),
	ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
		Enabled: jsii.Boolean(false),

		// the properties below are optional
		Mode: jsii.String("mode"),
	},
	DeletionProtectionEnabled: jsii.Boolean(false),
	GlobalSecondaryIndexes: []interface{}{
		&GlobalSecondaryIndexProperty{
			IndexName: jsii.String("indexName"),
			KeySchema: []interface{}{
				&KeySchemaProperty{
					AttributeName: jsii.String("attributeName"),
					KeyType: jsii.String("keyType"),
				},
			},
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},

			// the properties below are optional
			ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
				Enabled: jsii.Boolean(false),

				// the properties below are optional
				Mode: jsii.String("mode"),
			},
			OnDemandThroughput: &OnDemandThroughputProperty{
				MaxReadRequestUnits: jsii.Number(123),
				MaxWriteRequestUnits: jsii.Number(123),
			},
			ProvisionedThroughput: &ProvisionedThroughputProperty{
				ReadCapacityUnits: jsii.Number(123),
				WriteCapacityUnits: jsii.Number(123),
			},
			WarmThroughput: &WarmThroughputProperty{
				ReadUnitsPerSecond: jsii.Number(123),
				WriteUnitsPerSecond: jsii.Number(123),
			},
		},
	},
	ImportSourceSpecification: &ImportSourceSpecificationProperty{
		InputFormat: jsii.String("inputFormat"),
		S3BucketSource: &S3BucketSourceProperty{
			S3Bucket: jsii.String("s3Bucket"),

			// the properties below are optional
			S3BucketOwner: jsii.String("s3BucketOwner"),
			S3KeyPrefix: jsii.String("s3KeyPrefix"),
		},

		// the properties below are optional
		InputCompressionType: jsii.String("inputCompressionType"),
		InputFormatOptions: &InputFormatOptionsProperty{
			Csv: &CsvProperty{
				Delimiter: jsii.String("delimiter"),
				HeaderList: []*string{
					jsii.String("headerList"),
				},
			},
		},
	},
	KinesisStreamSpecification: &KinesisStreamSpecificationProperty{
		StreamArn: jsii.String("streamArn"),

		// the properties below are optional
		ApproximateCreationDateTimePrecision: jsii.String("approximateCreationDateTimePrecision"),
	},
	LocalSecondaryIndexes: []interface{}{
		&LocalSecondaryIndexProperty{
			IndexName: jsii.String("indexName"),
			KeySchema: []interface{}{
				&KeySchemaProperty{
					AttributeName: jsii.String("attributeName"),
					KeyType: jsii.String("keyType"),
				},
			},
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},
		},
	},
	OnDemandThroughput: &OnDemandThroughputProperty{
		MaxReadRequestUnits: jsii.Number(123),
		MaxWriteRequestUnits: jsii.Number(123),
	},
	PointInTimeRecoverySpecification: &PointInTimeRecoverySpecificationProperty{
		PointInTimeRecoveryEnabled: jsii.Boolean(false),
		RecoveryPeriodInDays: jsii.Number(123),
	},
	ProvisionedThroughput: &ProvisionedThroughputProperty{
		ReadCapacityUnits: jsii.Number(123),
		WriteCapacityUnits: jsii.Number(123),
	},
	ResourcePolicy: &ResourcePolicyProperty{
		PolicyDocument: policyDocument,
	},
	SseSpecification: &SSESpecificationProperty{
		SseEnabled: jsii.Boolean(false),

		// the properties below are optional
		KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
		SseType: jsii.String("sseType"),
	},
	StreamSpecification: &StreamSpecificationProperty{
		StreamViewType: jsii.String("streamViewType"),

		// the properties below are optional
		ResourcePolicy: &ResourcePolicyProperty{
			PolicyDocument: policyDocument,
		},
		Tags: []CfnTag{
			&CfnTag{
				Key: jsii.String("key"),
				Value: jsii.String("value"),
			},
		},
	},
	TableClass: jsii.String("tableClass"),
	TableName: jsii.String("tableName"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TimeToLiveSpecification: &TimeToLiveSpecificationProperty{
		Enabled: jsii.Boolean(false),

		// the properties below are optional
		AttributeName: jsii.String("attributeName"),
	},
	VectorIndexes: []interface{}{
		&VectorIndexProperty{
			Dimensions: jsii.Number(123),
			DistanceFunction: jsii.String("distanceFunction"),
			IndexName: jsii.String("indexName"),
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},
			VectorAttribute: &VectorAttributeProperty{
				AttributeName: jsii.String("attributeName"),
			},

			// the properties below are optional
			SearchSchema: []interface{}{
				&SearchSchemaElementProperty{
					AttributeName: jsii.String("attributeName"),
					SearchSchemaElementType: jsii.String("searchSchemaElementType"),
				},
			},
		},
	},
	WarmThroughput: &WarmThroughputProperty{
		ReadUnitsPerSecond: jsii.Number(123),
		WriteUnitsPerSecond: jsii.Number(123),
	},
}

Properties ​

attributeDefinitionsoptionalIResolvable | IResolvable | CfnTable.AttributeDefinitionProperty[]attribute_definitionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AttributeDefinitionProperty]]]attributeDefinitionsoptionalIResolvableAttributeDefinitionsoptionalIResolvableAttributeDefinitionsoptionalinterface{} #
A list of attributes that describe the key schema for the table and indexes.
notes

This property is required to create a DynamoDB table.

Update requires: Some interruptions . Replacement if you edit an existing AttributeDefinition.

billingModeoptionalstringbilling_modeoptionalstrbillingModeoptionalStringBillingModeoptionalstringBillingModeoptional*string #
Specify how you are charged for read and write throughput and how you manage capacity.
notes

Valid values include:

  • PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for most DynamoDB workloads. PAY_PER_REQUEST sets the billing mode to On-demand capacity mode .
  • PROVISIONED - We recommend using PROVISIONED for steady workloads with predictable growth where capacity requirements can be reliably forecasted. PROVISIONED sets the billing mode to Provisioned capacity mode .

If not specified, the default is PROVISIONED .

contributorInsightsSpecificationoptionalIResolvable | CfnTable.ContributorInsightsSpecificationPropertycontributor_insights_specificationoptionaltyping.Union[IResolvable, ContributorInsightsSpecificationProperty]contributorInsightsSpecificationoptionalIResolvableContributorInsightsSpecificationoptionalIResolvableContributorInsightsSpecificationoptionalinterface{} #
The settings used to specify whether to enable CloudWatch Contributor Insights for the table and define which events to monitor.
deletionProtectionEnabledoptionalboolean | IResolvabledeletion_protection_enabledoptionaltyping.Union[bool, IResolvable]deletionProtectionEnabledoptionalBooleanDeletionProtectionEnabledoptionalboolDeletionProtectionEnabledoptionalinterface{} #
Determines if a table is protected from deletion.
notes

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 .

globalSecondaryIndexesoptionalIResolvable | IResolvable | CfnTable.GlobalSecondaryIndexProperty[]global_secondary_indexesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, GlobalSecondaryIndexProperty]]]globalSecondaryIndexesoptionalIResolvableGlobalSecondaryIndexesoptionalIResolvableGlobalSecondaryIndexesoptionalinterface{} #
Global secondary indexes to be created on the table. You can create up to 20 global secondary indexes.
notes

If you update a table to include a new global secondary index, AWS CloudFormation initiates the index creation and then proceeds with the stack update. AWS CloudFormation doesn't wait for the index to complete creation because the backfilling phase can take a long time, depending on the size of the table. You can't use the index or update the table until the index's status is ACTIVE . You can track its status by using the DynamoDB DescribeTable command.

If you add or delete an index 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 index, you must manually delete the index.

Updates are not supported. The following are exceptions:

  • If you update either the contributor insights specification or the provisioned throughput values of global secondary indexes, you can update the table without interruption.
  • You can delete or add one global secondary index without interruption. If you do both in the same update (for example, by changing the index's logical ID), the update fails.
importSourceSpecificationoptionalIResolvable | CfnTable.ImportSourceSpecificationPropertyimport_source_specificationoptionaltyping.Union[IResolvable, ImportSourceSpecificationProperty]importSourceSpecificationoptionalIResolvableImportSourceSpecificationoptionalIResolvableImportSourceSpecificationoptionalinterface{} #
Specifies the properties of data being imported from the S3 bucket source to the" table.
notes

If you specify the ImportSourceSpecification property, and also specify either the StreamSpecification , the TableClass property, the DeletionProtectionEnabled property, or the WarmThroughput property, the IAM entity creating/updating stack must have UpdateTable permission.

keySchemaIResolvable | IResolvable | CfnTable.KeySchemaProperty[]key_schematyping.Union[IResolvable, typing.List[typing.Union[IResolvable, KeySchemaProperty]]]keySchemaIResolvableKeySchemaIResolvableKeySchemainterface{} required #
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.

kinesisStreamSpecificationoptionalIResolvable | CfnTable.KinesisStreamSpecificationPropertykinesis_stream_specificationoptionaltyping.Union[IResolvable, KinesisStreamSpecificationProperty]kinesisStreamSpecificationoptionalIResolvableKinesisStreamSpecificationoptionalIResolvableKinesisStreamSpecificationoptionalinterface{} #
The Kinesis Data Streams configuration for the specified table.
localSecondaryIndexesoptionalIResolvable | IResolvable | CfnTable.LocalSecondaryIndexProperty[]local_secondary_indexesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, LocalSecondaryIndexProperty]]]localSecondaryIndexesoptionalIResolvableLocalSecondaryIndexesoptionalIResolvableLocalSecondaryIndexesoptionalinterface{} #
Local secondary indexes to be created on the table.

You can create up to 5 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.

onDemandThroughputoptionalIResolvable | CfnTable.OnDemandThroughputPropertyon_demand_throughputoptionaltyping.Union[IResolvable, OnDemandThroughputProperty]onDemandThroughputoptionalIResolvableOnDemandThroughputoptionalIResolvableOnDemandThroughputoptionalinterface{} #
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.

pointInTimeRecoverySpecificationoptionalIResolvable | CfnTable.PointInTimeRecoverySpecificationPropertypoint_in_time_recovery_specificationoptionaltyping.Union[IResolvable, PointInTimeRecoverySpecificationProperty]pointInTimeRecoverySpecificationoptionalIResolvablePointInTimeRecoverySpecificationoptionalIResolvablePointInTimeRecoverySpecificationoptionalinterface{} #
The settings used to enable point in time recovery.
provisionedThroughputoptionalIResolvable | CfnTable.ProvisionedThroughputPropertyprovisioned_throughputoptionaltyping.Union[IResolvable, ProvisionedThroughputProperty]provisionedThroughputoptionalIResolvableProvisionedThroughputoptionalIResolvableProvisionedThroughputoptionalinterface{} #
Throughput for the specified table, which consists of values for `ReadCapacityUnits` and `WriteCapacityUnits` .
notes

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

If you set BillingMode as PROVISIONED , you must specify this property. If you set BillingMode as PAY_PER_REQUEST , you cannot specify this property.

resourcePolicyoptionalIResolvable | CfnTable.ResourcePolicyPropertyresource_policyoptionaltyping.Union[IResolvable, ResourcePolicyProperty]resourcePolicyoptionalIResolvableResourcePolicyoptionalIResolvableResourcePolicyoptionalinterface{} #
An AWS resource-based policy document in JSON format that will be attached to the table.
notes

When you attach a resource-based policy while creating a table, the policy application is strongly consistent .

The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit. For a full list of all considerations that apply for resource-based policies, see Resource-based policy considerations .

You need to specify the CreateTable and PutResourcePolicy IAM actions for authorizing a user to create a table with a resource-based policy.

sseSpecificationoptionalIResolvable | CfnTable.SSESpecificationPropertysse_specificationoptionaltyping.Union[IResolvable, SSESpecificationProperty]sseSpecificationoptionalIResolvableSseSpecificationoptionalIResolvableSseSpecificationoptionalinterface{} #
Specifies the settings to enable server-side encryption.
streamSpecificationoptionalIResolvable | CfnTable.StreamSpecificationPropertystream_specificationoptionaltyping.Union[IResolvable, StreamSpecificationProperty]streamSpecificationoptionalIResolvableStreamSpecificationoptionalIResolvableStreamSpecificationoptionalinterface{} #
The settings for the DynamoDB table stream, which captures changes to items stored in the table.

Including this property in your AWS CloudFormation template automatically enables streaming.

tableClassoptionalstringtable_classoptionalstrtableClassoptionalStringTableClassoptionalstringTableClassoptional*string #
The table class of the new table.

Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

tableNameoptionalstringtable_nameoptionalstrtableNameoptionalStringTableNameoptionalstringTableNameoptional*string #
A name for the table.
notes

If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the table name. For more information, see Name Type .

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.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.

For more information, see Tag .

timeToLiveSpecificationoptionalIResolvable | CfnTable.TimeToLiveSpecificationPropertytime_to_live_specificationoptionaltyping.Union[IResolvable, TimeToLiveSpecificationProperty]timeToLiveSpecificationoptionalIResolvableTimeToLiveSpecificationoptionalIResolvableTimeToLiveSpecificationoptionalinterface{} #
Specifies the Time to Live (TTL) settings for the table.

For detailed information about the limits in DynamoDB, see Limits in Amazon DynamoDB in the Amazon DynamoDB Developer Guide.

vectorIndexesoptionalIResolvable | IResolvable | CfnTable.VectorIndexProperty[]vector_indexesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, VectorIndexProperty]]]vectorIndexesoptionalIResolvableVectorIndexesoptionalIResolvableVectorIndexesoptionalinterface{} #
warmThroughputoptionalIResolvable | CfnTable.WarmThroughputPropertywarm_throughputoptionaltyping.Union[IResolvable, WarmThroughputProperty]warmThroughputoptionalIResolvableWarmThroughputoptionalIResolvableWarmThroughputoptionalinterface{} #
Represents the warm throughput (in read units per second and write units per second) for creating a table.