public static final class MetricTargetTrackingProps.Builder
extends java.lang.Object
MetricTargetTrackingProps
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
MetricTargetTrackingProps |
build()
Builds the configured instance.
|
MetricTargetTrackingProps.Builder |
cooldown(Duration cooldown)
Sets the value of
BaseTargetTrackingProps.getCooldown() |
MetricTargetTrackingProps.Builder |
disableScaleIn(java.lang.Boolean disableScaleIn)
Sets the value of
BaseTargetTrackingProps.getDisableScaleIn() |
MetricTargetTrackingProps.Builder |
estimatedInstanceWarmup(Duration estimatedInstanceWarmup)
Sets the value of
BaseTargetTrackingProps.getEstimatedInstanceWarmup() |
MetricTargetTrackingProps.Builder |
metric(IMetric metric)
Sets the value of
MetricTargetTrackingProps.getMetric() |
MetricTargetTrackingProps.Builder |
targetValue(java.lang.Number targetValue)
Sets the value of
MetricTargetTrackingProps.getTargetValue() |
public MetricTargetTrackingProps.Builder metric(IMetric metric)
MetricTargetTrackingProps.getMetric()
metric
- Metric to track. This parameter is required.
The metric must represent a utilization, so that if it's higher than the
target value, your ASG should scale out, and if it's lower it should
scale in.this
public MetricTargetTrackingProps.Builder targetValue(java.lang.Number targetValue)
MetricTargetTrackingProps.getTargetValue()
targetValue
- Value to keep the metric around. This parameter is required.this
public MetricTargetTrackingProps.Builder cooldown(Duration cooldown)
BaseTargetTrackingProps.getCooldown()
cooldown
- Period after a scaling completes before another scaling activity can start.this
public MetricTargetTrackingProps.Builder disableScaleIn(java.lang.Boolean disableScaleIn)
BaseTargetTrackingProps.getDisableScaleIn()
disableScaleIn
- Indicates whether scale in by the target tracking policy is disabled.
If the value is true, scale in is disabled and the target tracking policy
won't remove capacity from the autoscaling group. Otherwise, scale in is
enabled and the target tracking policy can remove capacity from the
group.this
public MetricTargetTrackingProps.Builder estimatedInstanceWarmup(Duration estimatedInstanceWarmup)
BaseTargetTrackingProps.getEstimatedInstanceWarmup()
estimatedInstanceWarmup
- Estimated time until a newly launched instance can send metrics to CloudWatch.this
public MetricTargetTrackingProps build()
MetricTargetTrackingProps
java.lang.NullPointerException
- if any required attribute was not provided