Class StepScalingPolicy.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<StepScalingPolicy>
- Enclosing class:
- StepScalingPolicy
StepScalingPolicy
.-
Method Summary
Modifier and TypeMethodDescriptionadjustmentType
(AdjustmentType adjustmentType) How the adjustment numbers inside 'intervals' are interpreted.build()
Grace period after scaling activity.static StepScalingPolicy.Builder
datapointsToAlarm
(Number datapointsToAlarm) The number of data points out of the evaluation periods that must be breaching to trigger a scaling action.evaluationPeriods
(Number evaluationPeriods) How many evaluation periods of the metric to wait before triggering a scaling action.Metric to scale on.metricAggregationType
(MetricAggregationType metricAggregationType) Aggregation to apply to all data points over the evaluation periods.minAdjustmentMagnitude
(Number minAdjustmentMagnitude) Minimum absolute number to adjust capacity with as result of percentage scaling.scalingSteps
(List<? extends ScalingInterval> scalingSteps) The intervals for scaling.scalingTarget
(IScalableTarget scalingTarget) The scaling target.
-
Method Details
-
create
@Stability(Stable) public static StepScalingPolicy.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
StepScalingPolicy.Builder
.
-
metric
Metric to scale on.- Parameters:
metric
- Metric to scale on. This parameter is required.- Returns:
this
-
scalingSteps
@Stability(Stable) public StepScalingPolicy.Builder scalingSteps(List<? extends ScalingInterval> scalingSteps) The intervals for scaling.Maps a range of metric values to a particular scaling behavior.
- Parameters:
scalingSteps
- The intervals for scaling. This parameter is required.- Returns:
this
-
adjustmentType
How the adjustment numbers inside 'intervals' are interpreted.Default: ChangeInCapacity
- Parameters:
adjustmentType
- How the adjustment numbers inside 'intervals' are interpreted. This parameter is required.- Returns:
this
-
cooldown
Grace period after scaling activity.Subsequent scale outs during the cooldown period are squashed so that only the biggest scale out happens.
Subsequent scale ins during the cooldown period are ignored.
Default: No cooldown period
- Parameters:
cooldown
- Grace period after scaling activity. This parameter is required.- Returns:
this
- See Also:
-
datapointsToAlarm
The number of data points out of the evaluation periods that must be breaching to trigger a scaling action.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
.Default: `evaluationPeriods`
- Parameters:
datapointsToAlarm
- The number of data points out of the evaluation periods that must be breaching to trigger a scaling action. This parameter is required.- Returns:
this
-
evaluationPeriods
How many evaluation periods of the metric to wait before triggering a scaling action.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
- Parameters:
evaluationPeriods
- How many evaluation periods of the metric to wait before triggering a scaling action. This parameter is required.- Returns:
this
-
metricAggregationType
@Stability(Stable) public StepScalingPolicy.Builder metricAggregationType(MetricAggregationType metricAggregationType) Aggregation to apply to all data points over the evaluation periods.Only has meaning if
evaluationPeriods != 1
.Default: - The statistic from the metric if applicable (MIN, MAX, AVERAGE), otherwise AVERAGE.
- Parameters:
metricAggregationType
- Aggregation to apply to all data points over the evaluation periods. This parameter is required.- Returns:
this
-
minAdjustmentMagnitude
@Stability(Stable) public StepScalingPolicy.Builder minAdjustmentMagnitude(Number minAdjustmentMagnitude) Minimum absolute number to adjust capacity with as result of percentage scaling.Only when using AdjustmentType = PercentChangeInCapacity, this number controls the minimum absolute effect size.
Default: No minimum scaling effect
- Parameters:
minAdjustmentMagnitude
- Minimum absolute number to adjust capacity with as result of percentage scaling. This parameter is required.- Returns:
this
-
scalingTarget
The scaling target.- Parameters:
scalingTarget
- The scaling target. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<StepScalingPolicy>
- Returns:
- a newly built instance of
StepScalingPolicy
.
-