Show / Hide Table of Contents

Interface IBasicStepScalingPolicyProps

Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IBasicStepScalingPolicyProps
Syntax (vb)
Public Interface IBasicStepScalingPolicyProps
Remarks

ExampleMetadata: infused

Examples
AutoScalingGroup autoScalingGroup;


            var workerUtilizationMetric = new Metric(new MetricProps {
                Namespace = "MyService",
                MetricName = "WorkerUtilization"
            });

            autoScalingGroup.ScaleOnMetric("ScaleToCPU", new BasicStepScalingPolicyProps {
                Metric = workerUtilizationMetric,
                ScalingSteps = new [] { new ScalingInterval { Upper = 10, Change = -1 }, new ScalingInterval { Lower = 50, Change = +1 }, new ScalingInterval { Lower = 70, Change = +3 } },
                EvaluationPeriods = 10,
                DatapointsToAlarm = 5,

                // Change this to AdjustmentType.PERCENT_CHANGE_IN_CAPACITY to interpret the
                // 'change' numbers before as percentages instead of capacity counts.
                AdjustmentType = AdjustmentType.CHANGE_IN_CAPACITY
            });

Synopsis

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.

EstimatedInstanceWarmup

Estimated time until a newly launched instance can send metrics to CloudWatch.

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.

Properties

AdjustmentType

How the adjustment numbers inside 'intervals' are interpreted.

AdjustmentType? AdjustmentType { get; }
Property Value

AdjustmentType?

Remarks

Default: ChangeInCapacity

Cooldown

Grace period after scaling activity.

Duration? Cooldown { get; }
Property Value

Duration

Remarks

Default: Default cooldown period on your AutoScalingGroup

DatapointsToAlarm

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

double? DatapointsToAlarm { get; }
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. Must be less than or equal to evaluationPeriods.

Default: - Same as evaluationPeriods

EstimatedInstanceWarmup

Estimated time until a newly launched instance can send metrics to CloudWatch.

Duration? EstimatedInstanceWarmup { get; }
Property Value

Duration

Remarks

Default: Same as the cooldown

EvaluationPeriods

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

double? EvaluationPeriods { get; }
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.

IMetric Metric { get; }
Property Value

IMetric

Remarks

ExampleMetadata: infused

MetricAggregationType

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

MetricAggregationType? MetricAggregationType { get; }
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.

double? MinAdjustmentMagnitude { get; }
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.

IScalingInterval[] ScalingSteps { get; }
Property Value

IScalingInterval[]

Remarks

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

Must be between 2 and 40 steps.

Back to top Generated by DocFX