Class BasicStepScalingPolicyProps
- Namespace
- Amazon.CDK.AWS.AutoScaling
- Assembly
- Amazon.CDK.AWS.AutoScaling.dll
public class BasicStepScalingPolicyProps : IBasicStepScalingPolicyProps
- Inheritance
-
BasicStepScalingPolicyProps
- Implements
- Inherited Members
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 } },
// 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
});
Remarks
ExampleMetadata: infused
Constructors
BasicStepScalingPolicyProps()
public BasicStepScalingPolicyProps()
Properties
AdjustmentType
How the adjustment numbers inside 'intervals' are interpreted.
public AdjustmentType? AdjustmentType { get; set; }
Property Value
Remarks
Default: ChangeInCapacity
Cooldown
Grace period after scaling activity.
public Duration? Cooldown { get; set; }
Property Value
- Duration
Remarks
Default: Default cooldown period on your AutoScalingGroup
EstimatedInstanceWarmup
Estimated time until a newly launched instance can send metrics to CloudWatch.
public Duration? EstimatedInstanceWarmup { get; set; }
Property Value
- Duration
Remarks
Default: Same as the cooldown
EvaluationPeriods
How many evaluation periods of the metric to wait before triggering a scaling action.
public double? EvaluationPeriods { get; set; }
Property Value
Remarks
Raising this value can be used to smooth out the metric, at the expense of slower response times.
Default: 1
Metric
Metric to scale on.
public IMetric Metric { get; set; }
Property Value
- IMetric
MetricAggregationType
Aggregation to apply to all data points over the evaluation periods.
public MetricAggregationType? MetricAggregationType { get; set; }
Property Value
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
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
Remarks
Maps a range of metric values to a particular scaling behavior.