Class CfnGlobalTable.CapacityAutoScalingSettingsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGlobalTable.CapacityAutoScalingSettingsProperty>
- Enclosing interface:
CfnGlobalTable.CapacityAutoScalingSettingsProperty
CfnGlobalTable.CapacityAutoScalingSettingsProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.maxCapacity
(Number maxCapacity) Sets the value ofCfnGlobalTable.CapacityAutoScalingSettingsProperty.getMaxCapacity()
minCapacity
(Number minCapacity) Sets the value ofCfnGlobalTable.CapacityAutoScalingSettingsProperty.getMinCapacity()
seedCapacity
(Number seedCapacity) Sets the value ofCfnGlobalTable.CapacityAutoScalingSettingsProperty.getSeedCapacity()
targetTrackingScalingPolicyConfiguration
(IResolvable targetTrackingScalingPolicyConfiguration) targetTrackingScalingPolicyConfiguration
(CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty targetTrackingScalingPolicyConfiguration)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
maxCapacity
@Stability(Stable) public CfnGlobalTable.CapacityAutoScalingSettingsProperty.Builder maxCapacity(Number maxCapacity) Sets the value ofCfnGlobalTable.CapacityAutoScalingSettingsProperty.getMaxCapacity()
- Parameters:
maxCapacity
- The maximum provisioned capacity units for the global table. This parameter is required.- Returns:
this
-
minCapacity
@Stability(Stable) public CfnGlobalTable.CapacityAutoScalingSettingsProperty.Builder minCapacity(Number minCapacity) Sets the value ofCfnGlobalTable.CapacityAutoScalingSettingsProperty.getMinCapacity()
- Parameters:
minCapacity
- The minimum provisioned capacity units for the global table. This parameter is required.- Returns:
this
-
targetTrackingScalingPolicyConfiguration
@Stability(Stable) public CfnGlobalTable.CapacityAutoScalingSettingsProperty.Builder targetTrackingScalingPolicyConfiguration(IResolvable targetTrackingScalingPolicyConfiguration) Sets the value ofCfnGlobalTable.CapacityAutoScalingSettingsProperty.getTargetTrackingScalingPolicyConfiguration()
- Parameters:
targetTrackingScalingPolicyConfiguration
- Defines a target tracking scaling policy. This parameter is required.- Returns:
this
-
targetTrackingScalingPolicyConfiguration
@Stability(Stable) public CfnGlobalTable.CapacityAutoScalingSettingsProperty.Builder targetTrackingScalingPolicyConfiguration(CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty targetTrackingScalingPolicyConfiguration) Sets the value ofCfnGlobalTable.CapacityAutoScalingSettingsProperty.getTargetTrackingScalingPolicyConfiguration()
- Parameters:
targetTrackingScalingPolicyConfiguration
- Defines a target tracking scaling policy. This parameter is required.- Returns:
this
-
seedCapacity
@Stability(Stable) public CfnGlobalTable.CapacityAutoScalingSettingsProperty.Builder seedCapacity(Number seedCapacity) Sets the value ofCfnGlobalTable.CapacityAutoScalingSettingsProperty.getSeedCapacity()
- Parameters:
seedCapacity
- When switching billing mode fromPAY_PER_REQUEST
toPROVISIONED
, DynamoDB requires you to specify read and write capacity unit values for the table and for each global secondary index. These values will be applied to all replicas. The table will use these provisioned values until CloudFormation creates the autoscaling policies you configured in your template. CloudFormation cannot determine what capacity the table and its global secondary indexes will require in this time period, since they are application-dependent.If you want to switch a table's billing mode from
PAY_PER_REQUEST
toPROVISIONED
, you must specify a value for this property for each autoscaled resource. If you specify different values for the same resource in different regions, CloudFormation will use the highest value found in either theSeedCapacity
orReadCapacityUnits
properties. For example, if your global secondary indexmyGSI
has aSeedCapacity
of 10 in us-east-1 and a fixedReadCapacityUnits
of 20 in eu-west-1, CloudFormation will initially set the read capacity formyGSI
to 20. Note that if you disableScaleIn
formyGSI
in us-east-1, its read capacity units might not be set back to 10.You must also specify a value for
SeedCapacity
when you plan to switch a table's billing mode fromPROVISIONED
toPAY_PER_REQUEST
, because CloudFormation might need to roll back the operation (reverting the billing mode toPROVISIONED
) and this cannot succeed without specifying a value forSeedCapacity
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnGlobalTable.CapacityAutoScalingSettingsProperty>
- Returns:
- a new instance of
CfnGlobalTable.CapacityAutoScalingSettingsProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-