Class CfnTablePropsMixin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.dynamodb.CfnTablePropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-03-11T13:19:58.311Z")
@Stability(Stable)
public class CfnTablePropsMixin
extends Mixin
implements software.constructs.IMixin
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.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.dynamodb.*;
import software.amazon.awscdk.*;
IMergeStrategy mergeStrategy;
Object policyDocument;
CfnTablePropsMixin cfnTablePropsMixin = CfnTablePropsMixin.Builder.create(CfnTableMixinProps.builder()
.attributeDefinitions(List.of(AttributeDefinitionProperty.builder()
.attributeName("attributeName")
.attributeType("attributeType")
.build()))
.billingMode("billingMode")
.contributorInsightsSpecification(ContributorInsightsSpecificationProperty.builder()
.enabled(false)
.mode("mode")
.build())
.deletionProtectionEnabled(false)
.globalSecondaryIndexes(List.of(GlobalSecondaryIndexProperty.builder()
.contributorInsightsSpecification(ContributorInsightsSpecificationProperty.builder()
.enabled(false)
.mode("mode")
.build())
.indexName("indexName")
.keySchema(List.of(KeySchemaProperty.builder()
.attributeName("attributeName")
.keyType("keyType")
.build()))
.onDemandThroughput(OnDemandThroughputProperty.builder()
.maxReadRequestUnits(123)
.maxWriteRequestUnits(123)
.build())
.projection(ProjectionProperty.builder()
.nonKeyAttributes(List.of("nonKeyAttributes"))
.projectionType("projectionType")
.build())
.provisionedThroughput(ProvisionedThroughputProperty.builder()
.readCapacityUnits(123)
.writeCapacityUnits(123)
.build())
.warmThroughput(WarmThroughputProperty.builder()
.readUnitsPerSecond(123)
.writeUnitsPerSecond(123)
.build())
.build()))
.importSourceSpecification(ImportSourceSpecificationProperty.builder()
.inputCompressionType("inputCompressionType")
.inputFormat("inputFormat")
.inputFormatOptions(InputFormatOptionsProperty.builder()
.csv(CsvProperty.builder()
.delimiter("delimiter")
.headerList(List.of("headerList"))
.build())
.build())
.s3BucketSource(S3BucketSourceProperty.builder()
.s3Bucket("s3Bucket")
.s3BucketOwner("s3BucketOwner")
.s3KeyPrefix("s3KeyPrefix")
.build())
.build())
.keySchema(List.of(KeySchemaProperty.builder()
.attributeName("attributeName")
.keyType("keyType")
.build()))
.kinesisStreamSpecification(KinesisStreamSpecificationProperty.builder()
.approximateCreationDateTimePrecision("approximateCreationDateTimePrecision")
.streamArn("streamArn")
.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()
.kmsMasterKeyId("kmsMasterKeyId")
.sseEnabled(false)
.sseType("sseType")
.build())
.streamSpecification(StreamSpecificationProperty.builder()
.resourcePolicy(ResourcePolicyProperty.builder()
.policyDocument(policyDocument)
.build())
.streamViewType("streamViewType")
.build())
.tableClass("tableClass")
.tableName("tableName")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.timeToLiveSpecification(TimeToLiveSpecificationProperty.builder()
.attributeName("attributeName")
.enabled(false)
.build())
.warmThroughput(WarmThroughputProperty.builder()
.readUnitsPerSecond(123)
.writeUnitsPerSecond(123)
.build())
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRepresents an attribute for describing the schema for the table and indexes.static final classA fluent builder forCfnTablePropsMixin.static interfaceConfigures contributor insights settings for a table or one of its indexes.static interfaceThe options for imported source files in CSV format.static interfaceRepresents the properties of a global secondary index.static interfaceSpecifies the properties of data being imported from the S3 bucket source to the table.static interfaceThe format options for the data that was imported into the target table.static interfaceRepresents a single element of a key schema.static interfaceThe Kinesis Data Streams configuration for the specified table.static interfaceRepresents the properties of a local secondary index.static interfaceSets the maximum number of read and write units for the specified on-demand table.static interfaceThe settings used to enable point in time recovery.static interfaceRepresents attributes that are copied (projected) from the table into an index.static interfaceThroughput for the specified table, which consists of values forReadCapacityUnitsandWriteCapacityUnits.static interfaceCreates or updates a resource-based policy document that contains the permissions for DynamoDB resources, such as a table, its indexes, and stream.static interfaceThe S3 bucket that is being imported from.static interfaceRepresents the settings used to enable server-side encryption.static interfaceRepresents the DynamoDB Streams configuration for a table in DynamoDB.static interfaceRepresents the settings used to enable or disable Time to Live (TTL) for the specified table.static interfaceProvides visibility into the number of read and write operations your table or secondary index can instantaneously support.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::DynamoDB::Table.CfnTablePropsMixin(CfnTableMixinProps props, CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::DynamoDB::Table.protectedCfnTablePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnTablePropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnTableMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnTablePropsMixin
protected CfnTablePropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnTablePropsMixin
protected CfnTablePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnTablePropsMixin
@Stability(Stable) public CfnTablePropsMixin(@NotNull CfnTableMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::DynamoDB::Table.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnTablePropsMixin
Create a mixin to apply properties toAWS::DynamoDB::Table.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-