@Stability(value=Stable)
public static interface CfnScalingPolicy.StepAdjustmentProperty
extends software.amazon.jsii.JsiiSerializable
For the following examples, suppose that you have an alarm with a breach threshold of 50:
There are a few rules for the step adjustments for your step policy:
For more information, see Step adjustments in the Amazon EC2 Auto Scaling User Guide .
You can find a sample template snippet in the Examples section of the AWS::AutoScaling::ScalingPolicy resource.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.autoscaling.*;
StepAdjustmentProperty stepAdjustmentProperty = StepAdjustmentProperty.builder()
.scalingAdjustment(123)
// the properties below are optional
.metricIntervalLowerBound(123)
.metricIntervalUpperBound(123)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnScalingPolicy.StepAdjustmentProperty.Builder
A builder for
CfnScalingPolicy.StepAdjustmentProperty |
static class |
CfnScalingPolicy.StepAdjustmentProperty.Jsii$Proxy
An implementation for
CfnScalingPolicy.StepAdjustmentProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnScalingPolicy.StepAdjustmentProperty.Builder |
builder() |
default Number |
getMetricIntervalLowerBound()
The lower bound for the difference between the alarm threshold and the CloudWatch metric.
|
default Number |
getMetricIntervalUpperBound()
The upper bound for the difference between the alarm threshold and the CloudWatch metric.
|
Number |
getScalingAdjustment()
The amount by which to scale, based on the specified adjustment type.
|
@Stability(value=Stable) @NotNull Number getScalingAdjustment()
A positive value adds to the current capacity while a negative number removes from the current capacity.
The amount by which to scale. The adjustment is based on the value that you specified in the AdjustmentType property (either an absolute number or a percentage). A positive value adds to the current capacity and a negative number subtracts from the current capacity.
@Stability(value=Stable) @Nullable default Number getMetricIntervalLowerBound()
If the metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater than or equal to the threshold plus the lower bound). Otherwise, it is exclusive (the metric must be greater than the threshold plus the lower bound). A null value indicates negative infinity.
@Stability(value=Stable) @Nullable default Number getMetricIntervalUpperBound()
If the metric value is above the breach threshold, the upper bound is exclusive (the metric must be less than the threshold plus the upper bound). Otherwise, it is inclusive (the metric must be less than or equal to the threshold plus the upper bound). A null value indicates positive infinity.
The upper bound must be greater than the lower bound.
@Stability(value=Stable) static CfnScalingPolicy.StepAdjustmentProperty.Builder builder()
Copyright © 2022. All rights reserved.