public static final class BasicStepScalingPolicyProps.Builder
extends java.lang.Object
BasicStepScalingPolicyProps
Constructor and Description |
---|
Builder() |
public BasicStepScalingPolicyProps.Builder metric(IMetric metric)
BasicStepScalingPolicyProps.getMetric()
metric
- Metric to scale on. This parameter is required.this
public BasicStepScalingPolicyProps.Builder scalingSteps(java.util.List<? extends ScalingInterval> scalingSteps)
BasicStepScalingPolicyProps.getScalingSteps()
scalingSteps
- The intervals for scaling. This parameter is required.
Maps a range of metric values to a particular scaling behavior.this
public BasicStepScalingPolicyProps.Builder adjustmentType(AdjustmentType adjustmentType)
BasicStepScalingPolicyProps.getAdjustmentType()
adjustmentType
- How the adjustment numbers inside 'intervals' are interpreted.this
public BasicStepScalingPolicyProps.Builder cooldown(Duration cooldown)
BasicStepScalingPolicyProps.getCooldown()
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.
this
public BasicStepScalingPolicyProps.Builder datapointsToAlarm(java.lang.Number datapointsToAlarm)
BasicStepScalingPolicyProps.getDatapointsToAlarm()
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
.
this
public BasicStepScalingPolicyProps.Builder evaluationPeriods(java.lang.Number evaluationPeriods)
BasicStepScalingPolicyProps.getEvaluationPeriods()
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.
this
public BasicStepScalingPolicyProps.Builder metricAggregationType(MetricAggregationType metricAggregationType)
BasicStepScalingPolicyProps.getMetricAggregationType()
metricAggregationType
- Aggregation to apply to all data points over the evaluation periods.
Only has meaning if evaluationPeriods != 1
.this
public BasicStepScalingPolicyProps.Builder minAdjustmentMagnitude(java.lang.Number minAdjustmentMagnitude)
BasicStepScalingPolicyProps.getMinAdjustmentMagnitude()
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.this
public BasicStepScalingPolicyProps build()
BasicStepScalingPolicyProps
java.lang.NullPointerException
- if any required attribute was not provided