Enum AdjustmentType
- Namespace
- Amazon.CDK.AWS.AutoScaling
- Assembly
- Amazon.CDK.AWS.AutoScaling.dll
How adjustment numbers are interpreted.
public enum AdjustmentType
Fields
CHANGE_IN_CAPACITY = 0
Add the adjustment number to the current capacity.
EXACT_CAPACITY = 2
Make the capacity equal to the exact number given.
PERCENT_CHANGE_IN_CAPACITY = 1
Add this percentage of the current capacity to itself.
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