Table of Contents

Class StepScalingPolicy

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

Define a acaling strategy which scales depending on absolute values of some metric.

public class StepScalingPolicy : Construct
Inheritance
StepScalingPolicy

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.AWS.CloudWatch;
             using Amazon.CDK;

             AutoScalingGroup autoScalingGroup;
             Metric metric;
             var stepScalingPolicy = new StepScalingPolicy(this, "MyStepScalingPolicy", new StepScalingPolicyProps {
                 AutoScalingGroup = autoScalingGroup,
                 Metric = metric,
                 ScalingSteps = new [] { new ScalingInterval {
                     Change = 123,

                     // the properties below are optional
                     Lower = 123,
                     Upper = 123
                 } },

                 // the properties below are optional
                 AdjustmentType = AdjustmentType.CHANGE_IN_CAPACITY,
                 Cooldown = Duration.Minutes(30),
                 EstimatedInstanceWarmup = Duration.Minutes(30),
                 EvaluationPeriods = 123,
                 MetricAggregationType = MetricAggregationType.AVERAGE,
                 MinAdjustmentMagnitude = 123
             });

Remarks

You can specify the scaling behavior for various values of the metric.

Implemented using one or more CloudWatch alarms and Step Scaling Policies.

ExampleMetadata: fixture=_generated

Constructors

StepScalingPolicy(Construct, string, IStepScalingPolicyProps)

public StepScalingPolicy(Construct scope, string id, IStepScalingPolicyProps props)

Parameters

scope Construct
id string
props IStepScalingPolicyProps

Properties

LowerAction

public virtual StepScalingAction? LowerAction { get; }

Property Value

StepScalingAction

LowerAlarm

public virtual Alarm? LowerAlarm { get; }

Property Value

Alarm

UpperAction

public virtual StepScalingAction? UpperAction { get; }

Property Value

StepScalingAction

UpperAlarm

public virtual Alarm? UpperAlarm { get; }

Property Value

Alarm