Class StepScalingAction
Define a step scaling action.
Inherited Members
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.AWS.AutoScaling.dll
Syntax (csharp)
public class StepScalingAction : Construct, IConstruct, IDependable
Syntax (vb)
Public Class StepScalingAction
Inherits Construct
Implements IConstruct, IDependable
Remarks
This kind of scaling policy adjusts the target capacity in configurable steps. The size of the step is configurable based on the metric's distance to its alarm threshold.
This Action must be used as the target of a CloudWatch alarm to take effect.
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.AutoScaling;
using Amazon.CDK;
AutoScalingGroup autoScalingGroup;
var stepScalingAction = new StepScalingAction(this, "MyStepScalingAction", new StepScalingActionProps {
AutoScalingGroup = autoScalingGroup,
// the properties below are optional
AdjustmentType = AdjustmentType.CHANGE_IN_CAPACITY,
Cooldown = Duration.Minutes(30),
EstimatedInstanceWarmup = Duration.Minutes(30),
MetricAggregationType = MetricAggregationType.AVERAGE,
MinAdjustmentMagnitude = 123
});
Synopsis
Constructors
StepScalingAction(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
StepScalingAction(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
StepScalingAction(Construct, String, IStepScalingActionProps) |
Properties
ScalingPolicyArn | ARN of the scaling policy. |
Methods
AddAdjustment(IAdjustmentTier) | Add an adjusment interval to the ScalingAction. |
Constructors
StepScalingAction(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected StepScalingAction(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
StepScalingAction(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected StepScalingAction(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
StepScalingAction(Construct, String, IStepScalingActionProps)
public StepScalingAction(Construct scope, string id, IStepScalingActionProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IStepScalingActionProps
Properties
ScalingPolicyArn
ARN of the scaling policy.
public virtual string ScalingPolicyArn { get; }
Property Value
System.String
Methods
AddAdjustment(IAdjustmentTier)
Add an adjusment interval to the ScalingAction.
public virtual void AddAdjustment(IAdjustmentTier adjustment)
Parameters
- adjustment IAdjustmentTier