Class StepScalingPolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.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()autoScalingGroup(IAutoScalingGroup autoScalingGroup) Sets the value ofStepScalingPolicyProps.getAutoScalingGroup()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
-
autoScalingGroup
@Stability(Stable) public StepScalingPolicyProps.Builder autoScalingGroup(IAutoScalingGroup autoScalingGroup) Sets the value ofStepScalingPolicyProps.getAutoScalingGroup()- Parameters:
autoScalingGroup- The auto scaling group. 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.- Returns:
this
-
estimatedInstanceWarmup
@Stability(Stable) public StepScalingPolicyProps.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 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.- 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:
buildin interfacesoftware.amazon.jsii.Builder<StepScalingPolicyProps>- Returns:
- a new instance of
StepScalingPolicyProps - Throws:
NullPointerException- if any required attribute was not provided
-