Class StepScalingPolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.applicationautoscaling.StepScalingPolicyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<StepScalingPolicyProps>
- Enclosing interface:
- StepScalingPolicyProps
@Stability(Stable)
public static final class StepScalingPolicyProps.Builder
extends Object
implements software.amazon.jsii.Builder<StepScalingPolicyProps>
A builder for
StepScalingPolicyProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadjustmentType
(AdjustmentType adjustmentType) Sets the value ofBasicStepScalingPolicyProps.getAdjustmentType()
build()
Builds the configured instance.Sets the value ofBasicStepScalingPolicyProps.getCooldown()
datapointsToAlarm
(Number datapointsToAlarm) Sets the value ofBasicStepScalingPolicyProps.getDatapointsToAlarm()
evaluationPeriods
(Number evaluationPeriods) Sets the value ofBasicStepScalingPolicyProps.getEvaluationPeriods()
Sets the value ofBasicStepScalingPolicyProps.getMetric()
metricAggregationType
(MetricAggregationType metricAggregationType) Sets the value ofBasicStepScalingPolicyProps.getMetricAggregationType()
minAdjustmentMagnitude
(Number minAdjustmentMagnitude) Sets the value ofBasicStepScalingPolicyProps.getMinAdjustmentMagnitude()
scalingSteps
(List<? extends ScalingInterval> scalingSteps) Sets the value ofBasicStepScalingPolicyProps.getScalingSteps()
scalingTarget
(IScalableTarget scalingTarget) Sets the value ofStepScalingPolicyProps.getScalingTarget()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
scalingTarget
@Stability(Stable) public StepScalingPolicyProps.Builder scalingTarget(IScalableTarget scalingTarget) Sets the value ofStepScalingPolicyProps.getScalingTarget()
- Parameters:
scalingTarget
- The scaling target. This parameter is required.- Returns:
this
-
metric
Sets the value ofBasicStepScalingPolicyProps.getMetric()
- Parameters:
metric
- Metric to scale on. This parameter is required.- Returns:
this
-
scalingSteps
@Stability(Stable) public StepScalingPolicyProps.Builder scalingSteps(List<? extends ScalingInterval> scalingSteps) Sets the value ofBasicStepScalingPolicyProps.getScalingSteps()
- Parameters:
scalingSteps
- The intervals for scaling. This parameter is required. Maps a range of metric values to a particular scaling behavior.- Returns:
this
-
adjustmentType
@Stability(Stable) public StepScalingPolicyProps.Builder adjustmentType(AdjustmentType adjustmentType) Sets the value ofBasicStepScalingPolicyProps.getAdjustmentType()
- Parameters:
adjustmentType
- How the adjustment numbers inside 'intervals' are interpreted.- Returns:
this
-
cooldown
Sets the value ofBasicStepScalingPolicyProps.getCooldown()
- Parameters:
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.
- Returns:
this
-
datapointsToAlarm
@Stability(Stable) public StepScalingPolicyProps.Builder datapointsToAlarm(Number datapointsToAlarm) Sets the value ofBasicStepScalingPolicyProps.getDatapointsToAlarm()
- Parameters:
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 forevaluationPeriods
is the N value.Only has meaning if
evaluationPeriods != 1
.- Returns:
this
-
evaluationPeriods
@Stability(Stable) public StepScalingPolicyProps.Builder evaluationPeriods(Number evaluationPeriods) Sets the value ofBasicStepScalingPolicyProps.getEvaluationPeriods()
- Parameters:
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.- Returns:
this
-
metricAggregationType
@Stability(Stable) public StepScalingPolicyProps.Builder metricAggregationType(MetricAggregationType metricAggregationType) Sets the value ofBasicStepScalingPolicyProps.getMetricAggregationType()
- Parameters:
metricAggregationType
- Aggregation to apply to all data points over the evaluation periods. Only has meaning ifevaluationPeriods != 1
.- Returns:
this
-
minAdjustmentMagnitude
@Stability(Stable) public StepScalingPolicyProps.Builder minAdjustmentMagnitude(Number minAdjustmentMagnitude) Sets the value ofBasicStepScalingPolicyProps.getMinAdjustmentMagnitude()
- Parameters:
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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<StepScalingPolicyProps>
- Returns:
- a new instance of
StepScalingPolicyProps
- Throws:
NullPointerException
- if any required attribute was not provided
-