public static final class StepScalingPolicy.Builder
extends java.lang.Object
StepScalingPolicy
.Modifier and Type | Method and Description |
---|---|
StepScalingPolicy.Builder |
adjustmentType(AdjustmentType adjustmentType)
How the adjustment numbers inside 'intervals' are interpreted.
|
StepScalingPolicy.Builder |
autoScalingGroup(IAutoScalingGroup autoScalingGroup)
The auto scaling group.
|
StepScalingPolicy |
build() |
StepScalingPolicy.Builder |
cooldown(Duration cooldown)
Grace period after scaling activity.
|
static StepScalingPolicy.Builder |
create(software.constructs.Construct scope,
java.lang.String id) |
StepScalingPolicy.Builder |
estimatedInstanceWarmup(Duration estimatedInstanceWarmup)
Estimated time until a newly launched instance can send metrics to CloudWatch.
|
StepScalingPolicy.Builder |
evaluationPeriods(java.lang.Number evaluationPeriods)
How many evaluation periods of the metric to wait before triggering a scaling action.
|
StepScalingPolicy.Builder |
metric(IMetric metric)
Metric to scale on.
|
StepScalingPolicy.Builder |
metricAggregationType(MetricAggregationType metricAggregationType)
Aggregation to apply to all data points over the evaluation periods.
|
StepScalingPolicy.Builder |
minAdjustmentMagnitude(java.lang.Number minAdjustmentMagnitude)
Minimum absolute number to adjust capacity with as result of percentage scaling.
|
StepScalingPolicy.Builder |
scalingSteps(java.util.List<? extends ScalingInterval> scalingSteps)
The intervals for scaling.
|
public static StepScalingPolicy.Builder create(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.StepScalingPolicy.Builder
.public StepScalingPolicy.Builder metric(IMetric metric)
metric
- Metric to scale on. This parameter is required.this
public StepScalingPolicy.Builder scalingSteps(java.util.List<? extends ScalingInterval> scalingSteps)
Maps a range of metric values to a particular scaling behavior.
scalingSteps
- The intervals for scaling. This parameter is required.this
public StepScalingPolicy.Builder adjustmentType(AdjustmentType adjustmentType)
Default: ChangeInCapacity
adjustmentType
- How the adjustment numbers inside 'intervals' are interpreted. This parameter is required.this
public StepScalingPolicy.Builder cooldown(Duration cooldown)
Default: Default cooldown period on your AutoScalingGroup
cooldown
- Grace period after scaling activity. This parameter is required.this
public StepScalingPolicy.Builder estimatedInstanceWarmup(Duration estimatedInstanceWarmup)
Default: Same as the cooldown
estimatedInstanceWarmup
- Estimated time until a newly launched instance can send metrics to CloudWatch. This parameter is required.this
public StepScalingPolicy.Builder evaluationPeriods(java.lang.Number evaluationPeriods)
Raising this value can be used to smooth out the metric, at the expense of slower response times.
Default: 1
evaluationPeriods
- How many evaluation periods of the metric to wait before triggering a scaling action. This parameter is required.this
public StepScalingPolicy.Builder metricAggregationType(MetricAggregationType metricAggregationType)
Only has meaning if evaluationPeriods != 1
.
Default: - The statistic from the metric if applicable (MIN, MAX, AVERAGE), otherwise AVERAGE.
metricAggregationType
- Aggregation to apply to all data points over the evaluation periods. This parameter is required.this
public StepScalingPolicy.Builder minAdjustmentMagnitude(java.lang.Number minAdjustmentMagnitude)
Only when using AdjustmentType = PercentChangeInCapacity, this number controls the minimum absolute effect size.
Default: No minimum scaling effect
minAdjustmentMagnitude
- Minimum absolute number to adjust capacity with as result of percentage scaling. This parameter is required.this
public StepScalingPolicy.Builder autoScalingGroup(IAutoScalingGroup autoScalingGroup)
autoScalingGroup
- The auto scaling group. This parameter is required.this
public StepScalingPolicy build()