Table of Contents

Class StepScalingAction

Namespace
Amazon.CDK.AWS.AutoScaling
Assembly
Amazon.CDK.AWS.AutoScaling.dll

Define a step scaling action.

public class StepScalingAction : Construct
Inheritance
StepScalingAction

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
             });

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

Constructors

StepScalingAction(Construct, string, IStepScalingActionProps)

public StepScalingAction(Construct scope, string id, IStepScalingActionProps props)

Parameters

scope Construct
id string
props IStepScalingActionProps

Properties

ScalingPolicyArn

ARN of the scaling policy.

public virtual string ScalingPolicyArn { get; }

Property Value

string

Methods

AddAdjustment(IAdjustmentTier)

Add an adjusment interval to the ScalingAction.

public virtual void AddAdjustment(IAdjustmentTier adjustment)

Parameters

adjustment IAdjustmentTier