Class CfnGlobalTable.CapacityAutoScalingSettingsProperty
Configures a scalable target and an autoscaling policy for a table or global secondary index's read or write capacity.
Inheritance
Namespace: Amazon.CDK.AWS.DynamoDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CapacityAutoScalingSettingsProperty : Object, CfnGlobalTable.ICapacityAutoScalingSettingsProperty
Syntax (vb)
Public Class CapacityAutoScalingSettingsProperty
Inherits Object
Implements CfnGlobalTable.ICapacityAutoScalingSettingsProperty
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DynamoDB;
var capacityAutoScalingSettingsProperty = new CapacityAutoScalingSettingsProperty {
MaxCapacity = 123,
MinCapacity = 123,
TargetTrackingScalingPolicyConfiguration = new TargetTrackingScalingPolicyConfigurationProperty {
TargetValue = 123,
// the properties below are optional
DisableScaleIn = false,
ScaleInCooldown = 123,
ScaleOutCooldown = 123
},
// the properties below are optional
SeedCapacity = 123
};
Synopsis
Constructors
CapacityAutoScalingSettingsProperty() |
Properties
MaxCapacity | The maximum provisioned capacity units for the global table. |
MinCapacity | The minimum provisioned capacity units for the global table. |
SeedCapacity | When switching billing mode from |
TargetTrackingScalingPolicyConfiguration | Defines a target tracking scaling policy. |
Constructors
CapacityAutoScalingSettingsProperty()
public CapacityAutoScalingSettingsProperty()
Properties
MaxCapacity
The maximum provisioned capacity units for the global table.
public double MaxCapacity { get; set; }
Property Value
System.Double
Remarks
MinCapacity
The minimum provisioned capacity units for the global table.
public double MinCapacity { get; set; }
Property Value
System.Double
Remarks
SeedCapacity
When switching billing mode from PAY_PER_REQUEST
to PROVISIONED
, DynamoDB requires you to specify read and write capacity unit values for the table and for each global secondary index.
public Nullable<double> SeedCapacity { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
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
to PROVISIONED
, 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 the SeedCapacity
or ReadCapacityUnits
properties. For example, if your global secondary index myGSI
has a SeedCapacity
of 10 in us-east-1 and a fixed ReadCapacityUnits
of 20 in eu-west-1, CloudFormation will initially set the read capacity for myGSI
to 20. Note that if you disable ScaleIn
for myGSI
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 from PROVISIONED
to PAY_PER_REQUEST
, because CloudFormation might need to roll back the operation (reverting the billing mode to PROVISIONED
) and this cannot succeed without specifying a value for SeedCapacity
.
TargetTrackingScalingPolicyConfiguration
Defines a target tracking scaling policy.
public object TargetTrackingScalingPolicyConfiguration { get; set; }
Property Value
System.Object