Class StepScalingPolicyProps
Inheritance
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.AWS.AutoScaling.dll
Syntax (csharp)
public class StepScalingPolicyProps : Object, IStepScalingPolicyProps, IBasicStepScalingPolicyProps
Syntax (vb)
Public Class StepScalingPolicyProps
Inherits Object
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.AWS.AutoScaling;
using Amazon.CDK.AWS.CloudWatch;
using Amazon.CDK;
AutoScalingGroup autoScalingGroup;
Metric metric;
var stepScalingPolicyProps = 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
};
Synopsis
Constructors
StepScalingPolicyProps() |
Properties
AdjustmentType | How the adjustment numbers inside 'intervals' are interpreted. |
AutoScalingGroup | The auto scaling group. |
Cooldown | Grace period after scaling activity. |
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. |
Constructors
StepScalingPolicyProps()
public StepScalingPolicyProps()
Properties
AdjustmentType
How the adjustment numbers inside 'intervals' are interpreted.
public Nullable<AdjustmentType> AdjustmentType { get; set; }
Property Value
System.Nullable<AdjustmentType>
Remarks
Default: ChangeInCapacity
AutoScalingGroup
The auto scaling group.
public IAutoScalingGroup AutoScalingGroup { get; set; }
Property Value
Cooldown
Grace period after scaling activity.
public Duration Cooldown { get; set; }
Property Value
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
Remarks
Default: Same as the cooldown
EvaluationPeriods
How many evaluation periods of the metric to wait before triggering a scaling action.
public Nullable<double> EvaluationPeriods { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Raising this value can be used to smooth out the metric, at the expense of slower response times.
Default: 1
Metric
MetricAggregationType
Aggregation to apply to all data points over the evaluation periods.
public Nullable<MetricAggregationType> MetricAggregationType { get; set; }
Property Value
System.Nullable<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 Nullable<double> MinAdjustmentMagnitude { get; set; }
Property Value
System.Nullable<System.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
Remarks
Maps a range of metric values to a particular scaling behavior.