Class BasicStepScalingPolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.BasicStepScalingPolicyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BasicStepScalingPolicyProps>
- Enclosing interface:
- BasicStepScalingPolicyProps
@Stability(Stable)
public static final class BasicStepScalingPolicyProps.Builder
extends Object
implements software.amazon.jsii.Builder<BasicStepScalingPolicyProps>
A builder for
BasicStepScalingPolicyProps-
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()estimatedInstanceWarmup(Duration estimatedInstanceWarmup) Sets the value ofBasicStepScalingPolicyProps.getEstimatedInstanceWarmup()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()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metric
Sets the value ofBasicStepScalingPolicyProps.getMetric()- Parameters:
metric- Metric to scale on. This parameter is required.- Returns:
this
-
scalingSteps
@Stability(Stable) public BasicStepScalingPolicyProps.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 BasicStepScalingPolicyProps.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.- Returns:
this
-
estimatedInstanceWarmup
@Stability(Stable) public BasicStepScalingPolicyProps.Builder estimatedInstanceWarmup(Duration estimatedInstanceWarmup) Sets the value ofBasicStepScalingPolicyProps.getEstimatedInstanceWarmup()- Parameters:
estimatedInstanceWarmup- Estimated time until a newly launched instance can send metrics to CloudWatch.- Returns:
this
-
evaluationPeriods
@Stability(Stable) public BasicStepScalingPolicyProps.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.- Returns:
this
-
metricAggregationType
@Stability(Stable) public BasicStepScalingPolicyProps.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 BasicStepScalingPolicyProps.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:
buildin interfacesoftware.amazon.jsii.Builder<BasicStepScalingPolicyProps>- Returns:
- a new instance of
BasicStepScalingPolicyProps - Throws:
NullPointerException- if any required attribute was not provided
-