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:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> 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 to AWS::DynamoDB::Table.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnTablePropsMixin

      @Stability(Stable) public CfnTablePropsMixin(@NotNull CfnTableMixinProps props)
      Create a mixin to apply properties to AWS::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.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnTableMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()