Show / Hide Table of Contents

Class StepScalingPolicyProps

Inheritance
object
StepScalingPolicyProps
Implements
IStepScalingPolicyProps
IBasicStepScalingPolicyProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class StepScalingPolicyProps : IStepScalingPolicyProps, IBasicStepScalingPolicyProps
Syntax (vb)
Public Class StepScalingPolicyProps Implements IStepScalingPolicyProps, IBasicStepScalingPolicyProps
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;
            using Amazon.CDK.AWS.ApplicationAutoScaling;
            using Amazon.CDK.AWS.CloudWatch;
            using Amazon.CDK.Interfaces.ApplicationAutoScaling;

            Metric metric;
            IScalableTargetRef scalableTargetRef;

            var stepScalingPolicyProps = new StepScalingPolicyProps {
                Metric = metric,
                ScalingSteps = new [] { new ScalingInterval {
                    Change = 123,

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

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

Synopsis

Constructors

StepScalingPolicyProps()

Properties

AdjustmentType

How the adjustment numbers inside 'intervals' are interpreted.

Cooldown

Grace period after scaling activity.

DatapointsToAlarm

The number of data points out of the evaluation periods that must be breaching to trigger a scaling action.

EvaluationPeriods

How many evaluation periods of the metric to wait before triggering a scaling action.

Metric

Metric to scale on.

MetricAggregationType

Aggregation to apply to all data points over the evaluation periods.

MinAdjustmentMagnitude

Minimum absolute number to adjust capacity with as result of percentage scaling.

ScalingSteps

The intervals for scaling.

ScalingTarget

The scaling target.

Constructors

StepScalingPolicyProps()

public StepScalingPolicyProps()
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;
            using Amazon.CDK.AWS.ApplicationAutoScaling;
            using Amazon.CDK.AWS.CloudWatch;
            using Amazon.CDK.Interfaces.ApplicationAutoScaling;

            Metric metric;
            IScalableTargetRef scalableTargetRef;

            var stepScalingPolicyProps = new StepScalingPolicyProps {
                Metric = metric,
                ScalingSteps = new [] { new ScalingInterval {
                    Change = 123,

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

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

Properties

AdjustmentType

How the adjustment numbers inside 'intervals' are interpreted.

public AdjustmentType? AdjustmentType { get; set; }
Property Value

AdjustmentType?

Remarks

Default: ChangeInCapacity

Cooldown

Grace period after scaling activity.

public Duration? Cooldown { get; set; }
Property Value

Duration

Remarks

Subsequent scale outs during the cooldown period are squashed so that only the biggest scale out happens.

Subsequent scale ins during the cooldown period are ignored.

Default: No cooldown period

See: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_StepScalingPolicyConfiguration.html

DatapointsToAlarm

The number of data points out of the evaluation periods that must be breaching to trigger a scaling action.

public double? DatapointsToAlarm { get; set; }
Property Value

double?

Remarks

Creates an "M out of N" alarm, where this property is the M and the value set for evaluationPeriods is the N value.

Only has meaning if evaluationPeriods != 1.

Default: - Same as evaluationPeriods

EvaluationPeriods

How many evaluation periods of the metric to wait before triggering a scaling action.

public double? EvaluationPeriods { get; set; }
Property Value

double?

Remarks

Raising this value can be used to smooth out the metric, at the expense of slower response times.

If datapointsToAlarm is not set, then all data points in the evaluation period must meet the criteria to trigger a scaling action.

Default: 1

Metric

Metric to scale on.

public IMetric Metric { get; set; }
Property Value

IMetric

Remarks

ExampleMetadata: fixture=_generated

MetricAggregationType

Aggregation to apply to all data points over the evaluation periods.

public MetricAggregationType? MetricAggregationType { get; set; }
Property Value

MetricAggregationType?

Remarks

Only has meaning if evaluationPeriods != 1.

Default: - The statistic from the metric if applicable (MIN, MAX, AVERAGE), otherwise AVERAGE.

MinAdjustmentMagnitude

Minimum absolute number to adjust capacity with as result of percentage scaling.

public double? MinAdjustmentMagnitude { get; set; }
Property Value

double?

Remarks

Only when using AdjustmentType = PercentChangeInCapacity, this number controls the minimum absolute effect size.

Default: No minimum scaling effect

ScalingSteps

The intervals for scaling.

public IScalingInterval[] ScalingSteps { get; set; }
Property Value

IScalingInterval[]

Remarks

Maps a range of metric values to a particular scaling behavior.

Must be between 2 and 40 steps.

ScalingTarget

The scaling target.

public IScalableTargetRef ScalingTarget { get; set; }
Property Value

IScalableTargetRef

Remarks

ExampleMetadata: fixture=_generated

Implements

IStepScalingPolicyProps
IBasicStepScalingPolicyProps
Back to top Generated by DocFX