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::Tableinto a resource of typeAWS::DynamoDB::GlobalTableby 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:DeleteScalingPolicyapplication-autoscaling:DeleteScheduledActionapplication-autoscaling:DeregisterScalableTargetapplication-autoscaling:DescribeScalableTargetsapplication-autoscaling:DescribeScalingPoliciesapplication-autoscaling:PutScalingPolicyapplication-autoscaling:PutScheduledActionapplication-autoscaling:RegisterScalableTargetdynamodb:BatchWriteItemdynamodb:CreateGlobalTableWitnessdynamodb:CreateTabledynamodb:CreateTableReplicadynamodb:DeleteGlobalTableWitnessdynamodb:DeleteItemdynamodb:DeleteTabledynamodb:DeleteTableReplicadynamodb:DescribeContinuousBackupsdynamodb:DescribeContributorInsightsdynamodb:DescribeTabledynamodb:DescribeTableReplicaAutoScalingdynamodb:DescribeTimeToLivedynamodb:DisableKinesisStreamingDestinationdynamodb:EnableKinesisStreamingDestinationdynamodb:GetItemdynamodb:ListTablesdynamodb:ListTagsOfResourcedynamodb:PutItemdynamodb:Querydynamodb:Scandynamodb:TagResourcedynamodb:UntagResourcedynamodb:UpdateContinuousBackupsdynamodb:UpdateContributorInsightsdynamodb:UpdateItemdynamodb:UpdateTabledynamodb:UpdateTableReplicaAutoScalingdynamodb:UpdateTimeToLiveiam:CreateServiceLinkedRolekms:CreateGrantkms: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
WriteProvisionedThroughputSettingsproperty. 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::GlobalTableresource. You should not configure additional auto scaling policies on any of the table replicas or global secondary indexes, either via API or viaAWS::ApplicationAutoScaling::ScalableTargetorAWS::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::GlobalTableresource 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 yourAWS::DynamoDB::GlobalTableresources 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRepresents an attribute for describing the schema for the table and indexes.static final classA fluent builder forCfnGlobalTablePropsMixin.static interfaceConfigures a scalable target and an autoscaling policy for a table or global secondary index's read or write capacity.static interfaceConfigures contributor insights settings for a replica or one of its indexes.static interfaceExample:static interfaceAllows you to specify a global secondary index for the global table.static interfaceThe witness Region for the MRSC global table.static interfaceRepresents a single element of a key schema.static interfaceThe Kinesis Data Streams configuration for the specified global table replica.static interfaceRepresents the properties of a local secondary index.static interfaceRepresents the settings used to enable point in time recovery.static interfaceRepresents attributes that are copied (projected) from the table into an index.static interfaceSets the read request settings for a replica table or a replica global secondary index.static interfaceAllows you to specify the read capacity settings for a replica table or a replica global secondary index when theBillingModeis set toPROVISIONED.static interfaceRepresents the properties of a global secondary index that can be set on a per-replica basis.static interfaceDefines settings specific to a single replica of a global table.static interfaceAllows you to specify a KMS key identifier to be used for server-side encryption.static interfaceRepresents the DynamoDB Streams configuration for a global table replica.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 interfaceRepresents the settings used to enable server-side encryption.static interfaceRepresents the DynamoDB Streams configuration for a table in DynamoDB .static interfaceDefines a target tracking scaling policy.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.static interfaceSets the write request settings for a global table or a global secondary index.static interfaceSpecifies an auto scaling policy for write capacity.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::GlobalTable.CfnGlobalTablePropsMixin(CfnGlobalTableMixinProps props, CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::DynamoDB::GlobalTable.protectedCfnGlobalTablePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnGlobalTablePropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnGlobalTableMixinPropsgetProps()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
-
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 toAWS::DynamoDB::GlobalTable.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnGlobalTablePropsMixin
Create a mixin to apply properties toAWS::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. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-