Table of Contents

Interface CfnScalingPolicy.IStepAdjustmentProperty

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

StepAdjustment specifies a step adjustment for the StepAdjustments property of the AWS::AutoScaling::ScalingPolicy resource.

public interface CfnScalingPolicy.IStepAdjustmentProperty

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;

             var stepAdjustmentProperty = new StepAdjustmentProperty {
                 ScalingAdjustment = 123,

                 // the properties below are optional
                 MetricIntervalLowerBound = 123,
                 MetricIntervalUpperBound = 123
             };

Remarks

For the following examples, suppose that you have an alarm with a breach threshold of 50:

    There are a few rules for the step adjustments for your step policy:

      For more information, see Step adjustments in the Amazon EC2 Auto Scaling User Guide .

      You can find a sample template snippet in the Examples section of the AWS::AutoScaling::ScalingPolicy resource.

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-stepadjustment.html

      ExampleMetadata: fixture=_generated

      Properties

      MetricIntervalLowerBound

      The lower bound for the difference between the alarm threshold and the CloudWatch metric.

      double? MetricIntervalLowerBound { get; }

      Property Value

      double?

      Remarks

      If the metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater than or equal to the threshold plus the lower bound). Otherwise, it is exclusive (the metric must be greater than the threshold plus the lower bound). A null value indicates negative infinity.

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-stepadjustment.html#cfn-autoscaling-scalingpolicy-stepadjustment-metricintervallowerbound

      MetricIntervalUpperBound

      The upper bound for the difference between the alarm threshold and the CloudWatch metric.

      double? MetricIntervalUpperBound { get; }

      Property Value

      double?

      Remarks

      If the metric value is above the breach threshold, the upper bound is exclusive (the metric must be less than the threshold plus the upper bound). Otherwise, it is inclusive (the metric must be less than or equal to the threshold plus the upper bound). A null value indicates positive infinity.

      The upper bound must be greater than the lower bound.

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-stepadjustment.html#cfn-autoscaling-scalingpolicy-stepadjustment-metricintervalupperbound

      ScalingAdjustment

      The amount by which to scale, based on the specified adjustment type.

      double ScalingAdjustment { get; }

      Property Value

      double

      Remarks

      A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a non-negative value.

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-stepadjustment.html#cfn-autoscaling-scalingpolicy-stepadjustment-scalingadjustment