Class CfnGlobalTablePropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.dynamodb.CfnGlobalTablePropsMixin
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.283Z") @Stability(Stable) public class CfnGlobalTablePropsMixin extends Mixin implements software.constructs.IMixin
The AWS::DynamoDB::GlobalTable resource enables you to create and manage a Version 2019.11.21 global table. This resource cannot be used to create or manage a Version 2017.11.29 global table. For more information, see Global tables .

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

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

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

  • The IAM Principal executing the stack operation must have the permissions listed below in all regions where you plan to have a global table replica. The IAM Principal's permissions should not have restrictions based on IP source address. Some global tables operations (for example, adding a replica) are asynchronous, and require that the IAM Principal is valid until they complete. You should not delete the Principal (user or IAM role) until CloudFormation has finished updating your stack.
  • application-autoscaling:DeleteScalingPolicy
  • application-autoscaling:DeleteScheduledAction
  • application-autoscaling:DeregisterScalableTarget
  • application-autoscaling:DescribeScalableTargets
  • application-autoscaling:DescribeScalingPolicies
  • application-autoscaling:PutScalingPolicy
  • application-autoscaling:PutScheduledAction
  • application-autoscaling:RegisterScalableTarget
  • dynamodb:BatchWriteItem
  • dynamodb:CreateGlobalTableWitness
  • dynamodb:CreateTable
  • dynamodb:CreateTableReplica
  • dynamodb:DeleteGlobalTableWitness
  • dynamodb:DeleteItem
  • dynamodb:DeleteTable
  • dynamodb:DeleteTableReplica
  • dynamodb:DescribeContinuousBackups
  • dynamodb:DescribeContributorInsights
  • dynamodb:DescribeTable
  • dynamodb:DescribeTableReplicaAutoScaling
  • dynamodb:DescribeTimeToLive
  • dynamodb:DisableKinesisStreamingDestination
  • dynamodb:EnableKinesisStreamingDestination
  • dynamodb:GetItem
  • dynamodb:ListTables
  • dynamodb:ListTagsOfResource
  • dynamodb:PutItem
  • dynamodb:Query
  • dynamodb:Scan
  • dynamodb:TagResource
  • dynamodb:UntagResource
  • dynamodb:UpdateContinuousBackups
  • dynamodb:UpdateContributorInsights
  • dynamodb:UpdateItem
  • dynamodb:UpdateTable
  • dynamodb:UpdateTableReplicaAutoScaling
  • dynamodb:UpdateTimeToLive
  • iam:CreateServiceLinkedRole
  • kms:CreateGrant
  • kms:DescribeKey
  • When using provisioned billing mode, CloudFormation will create an auto scaling policy on each of your replicas to control their write capacities. You must configure this policy using the WriteProvisionedThroughputSettings property. CloudFormation will ensure that all replicas have the same write capacity auto scaling property. You cannot directly specify a value for write capacity for a global table.
  • If your table uses provisioned capacity, you must configure auto scaling directly in the AWS::DynamoDB::GlobalTable resource. You should not configure additional auto scaling policies on any of the table replicas or global secondary indexes, either via API or via AWS::ApplicationAutoScaling::ScalableTarget or AWS::ApplicationAutoScaling::ScalingPolicy . Doing so might result in unexpected behavior and is unsupported.
  • In AWS CloudFormation , each global table is controlled by a single stack, in a single region, regardless of the number of replicas. When you deploy your template, CloudFormation will create/update all replicas as part of a single stack operation. You should not deploy the same AWS::DynamoDB::GlobalTable resource in multiple regions. Doing so will result in errors, and is unsupported. If you deploy your application template in multiple regions, you can use conditions to only create the resource in a single region. Alternatively, you can choose to define your AWS::DynamoDB::GlobalTable resources in a stack separate from your application stack, and make sure it is only deployed to a single region.

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;
 CfnGlobalTablePropsMixin cfnGlobalTablePropsMixin = CfnGlobalTablePropsMixin.Builder.create(CfnGlobalTableMixinProps.builder()
         .attributeDefinitions(List.of(AttributeDefinitionProperty.builder()
                 .attributeName("attributeName")
                 .attributeType("attributeType")
                 .build()))
         .billingMode("billingMode")
         .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())
                 .readOnDemandThroughputSettings(ReadOnDemandThroughputSettingsProperty.builder()
                         .maxReadRequestUnits(123)
                         .build())
                 .readProvisionedThroughputSettings(GlobalReadProvisionedThroughputSettingsProperty.builder()
                         .readCapacityUnits(123)
                         .build())
                 .warmThroughput(WarmThroughputProperty.builder()
                         .readUnitsPerSecond(123)
                         .writeUnitsPerSecond(123)
                         .build())
                 .writeOnDemandThroughputSettings(WriteOnDemandThroughputSettingsProperty.builder()
                         .maxWriteRequestUnits(123)
                         .build())
                 .writeProvisionedThroughputSettings(WriteProvisionedThroughputSettingsProperty.builder()
                         .writeCapacityAutoScalingSettings(CapacityAutoScalingSettingsProperty.builder()
                                 .maxCapacity(123)
                                 .minCapacity(123)
                                 .seedCapacity(123)
                                 .targetTrackingScalingPolicyConfiguration(TargetTrackingScalingPolicyConfigurationProperty.builder()
                                         .disableScaleIn(false)
                                         .scaleInCooldown(123)
                                         .scaleOutCooldown(123)
                                         .targetValue(123)
                                         .build())
                                 .build())
                         .build())
                 .build()))
         .globalTableSourceArn("globalTableSourceArn")
         .globalTableWitnesses(List.of(GlobalTableWitnessProperty.builder()
                 .region("region")
                 .build()))
         .keySchema(List.of(KeySchemaProperty.builder()
                 .attributeName("attributeName")
                 .keyType("keyType")
                 .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()))
         .multiRegionConsistency("multiRegionConsistency")
         .readOnDemandThroughputSettings(ReadOnDemandThroughputSettingsProperty.builder()
                 .maxReadRequestUnits(123)
                 .build())
         .readProvisionedThroughputSettings(GlobalReadProvisionedThroughputSettingsProperty.builder()
                 .readCapacityUnits(123)
                 .build())
         .replicas(List.of(ReplicaSpecificationProperty.builder()
                 .contributorInsightsSpecification(ContributorInsightsSpecificationProperty.builder()
                         .enabled(false)
                         .mode("mode")
                         .build())
                 .deletionProtectionEnabled(false)
                 .globalSecondaryIndexes(List.of(ReplicaGlobalSecondaryIndexSpecificationProperty.builder()
                         .contributorInsightsSpecification(ContributorInsightsSpecificationProperty.builder()
                                 .enabled(false)
                                 .mode("mode")
                                 .build())
                         .indexName("indexName")
                         .readOnDemandThroughputSettings(ReadOnDemandThroughputSettingsProperty.builder()
                                 .maxReadRequestUnits(123)
                                 .build())
                         .readProvisionedThroughputSettings(ReadProvisionedThroughputSettingsProperty.builder()
                                 .readCapacityAutoScalingSettings(CapacityAutoScalingSettingsProperty.builder()
                                         .maxCapacity(123)
                                         .minCapacity(123)
                                         .seedCapacity(123)
                                         .targetTrackingScalingPolicyConfiguration(TargetTrackingScalingPolicyConfigurationProperty.builder()
                                                 .disableScaleIn(false)
                                                 .scaleInCooldown(123)
                                                 .scaleOutCooldown(123)
                                                 .targetValue(123)
                                                 .build())
                                         .build())
                                 .readCapacityUnits(123)
                                 .build())
                         .build()))
                 .globalTableSettingsReplicationMode("globalTableSettingsReplicationMode")
                 .kinesisStreamSpecification(KinesisStreamSpecificationProperty.builder()
                         .approximateCreationDateTimePrecision("approximateCreationDateTimePrecision")
                         .streamArn("streamArn")
                         .build())
                 .pointInTimeRecoverySpecification(PointInTimeRecoverySpecificationProperty.builder()
                         .pointInTimeRecoveryEnabled(false)
                         .recoveryPeriodInDays(123)
                         .build())
                 .readOnDemandThroughputSettings(ReadOnDemandThroughputSettingsProperty.builder()
                         .maxReadRequestUnits(123)
                         .build())
                 .readProvisionedThroughputSettings(ReadProvisionedThroughputSettingsProperty.builder()
                         .readCapacityAutoScalingSettings(CapacityAutoScalingSettingsProperty.builder()
                                 .maxCapacity(123)
                                 .minCapacity(123)
                                 .seedCapacity(123)
                                 .targetTrackingScalingPolicyConfiguration(TargetTrackingScalingPolicyConfigurationProperty.builder()
                                         .disableScaleIn(false)
                                         .scaleInCooldown(123)
                                         .scaleOutCooldown(123)
                                         .targetValue(123)
                                         .build())
                                 .build())
                         .readCapacityUnits(123)
                         .build())
                 .region("region")
                 .replicaStreamSpecification(ReplicaStreamSpecificationProperty.builder()
                         .resourcePolicy(ResourcePolicyProperty.builder()
                                 .policyDocument(policyDocument)
                                 .build())
                         .build())
                 .resourcePolicy(ResourcePolicyProperty.builder()
                         .policyDocument(policyDocument)
                         .build())
                 .sseSpecification(ReplicaSSESpecificationProperty.builder()
                         .kmsMasterKeyId("kmsMasterKeyId")
                         .build())
                 .tableClass("tableClass")
                 .tags(List.of(CfnTag.builder()
                         .key("key")
                         .value("value")
                         .build()))
                 .build()))
         .sseSpecification(SSESpecificationProperty.builder()
                 .sseEnabled(false)
                 .sseType("sseType")
                 .build())
         .streamSpecification(StreamSpecificationProperty.builder()
                 .streamViewType("streamViewType")
                 .build())
         .tableName("tableName")
         .timeToLiveSpecification(TimeToLiveSpecificationProperty.builder()
                 .attributeName("attributeName")
                 .enabled(false)
                 .build())
         .warmThroughput(WarmThroughputProperty.builder()
                 .readUnitsPerSecond(123)
                 .writeUnitsPerSecond(123)
                 .build())
         .writeOnDemandThroughputSettings(WriteOnDemandThroughputSettingsProperty.builder()
                 .maxWriteRequestUnits(123)
                 .build())
         .writeProvisionedThroughputSettings(WriteProvisionedThroughputSettingsProperty.builder()
                 .writeCapacityAutoScalingSettings(CapacityAutoScalingSettingsProperty.builder()
                         .maxCapacity(123)
                         .minCapacity(123)
                         .seedCapacity(123)
                         .targetTrackingScalingPolicyConfiguration(TargetTrackingScalingPolicyConfigurationProperty.builder()
                                 .disableScaleIn(false)
                                 .scaleInCooldown(123)
                                 .scaleOutCooldown(123)
                                 .targetValue(123)
                                 .build())
                         .build())
                 .build())
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnGlobalTablePropsMixin

      protected CfnGlobalTablePropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnGlobalTablePropsMixin

      protected CfnGlobalTablePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnGlobalTablePropsMixin

      @Stability(Stable) public CfnGlobalTablePropsMixin(@NotNull CfnGlobalTableMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::DynamoDB::GlobalTable.

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

      @Stability(Stable) public CfnGlobalTablePropsMixin(@NotNull CfnGlobalTableMixinProps props)
      Create a mixin to apply properties to AWS::DynamoDB::GlobalTable.

      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 CfnGlobalTableMixinProps getProps()
    • getStrategy

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