Class CfnScalingPlan.TargetTrackingConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.autoscalingplans.CfnScalingPlan.TargetTrackingConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScalingPlan.TargetTrackingConfigurationProperty>
- Enclosing interface:
- CfnScalingPlan.TargetTrackingConfigurationProperty
@Stability(Stable)
public static final class CfnScalingPlan.TargetTrackingConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnScalingPlan.TargetTrackingConfigurationProperty>
A builder for
CfnScalingPlan.TargetTrackingConfigurationProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.customizedScalingMetricSpecification
(IResolvable customizedScalingMetricSpecification) customizedScalingMetricSpecification
(CfnScalingPlan.CustomizedScalingMetricSpecificationProperty customizedScalingMetricSpecification) disableScaleIn
(Boolean disableScaleIn) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getDisableScaleIn()
disableScaleIn
(IResolvable disableScaleIn) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getDisableScaleIn()
estimatedInstanceWarmup
(Number estimatedInstanceWarmup) predefinedScalingMetricSpecification
(IResolvable predefinedScalingMetricSpecification) predefinedScalingMetricSpecification
(CfnScalingPlan.PredefinedScalingMetricSpecificationProperty predefinedScalingMetricSpecification) scaleInCooldown
(Number scaleInCooldown) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getScaleInCooldown()
scaleOutCooldown
(Number scaleOutCooldown) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getScaleOutCooldown()
targetValue
(Number targetValue) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getTargetValue()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
targetValue
@Stability(Stable) public CfnScalingPlan.TargetTrackingConfigurationProperty.Builder targetValue(Number targetValue) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getTargetValue()
- Parameters:
targetValue
- The target value for the metric. This parameter is required. Although this property accepts numbers of type Double, it won't accept values that are either too small or too large. Values must be in the range of -2^360 to 2^360.- Returns:
this
-
customizedScalingMetricSpecification
@Stability(Stable) public CfnScalingPlan.TargetTrackingConfigurationProperty.Builder customizedScalingMetricSpecification(IResolvable customizedScalingMetricSpecification) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getCustomizedScalingMetricSpecification()
- Parameters:
customizedScalingMetricSpecification
- A customized metric. You can specify either a predefined metric or a customized metric.- Returns:
this
-
customizedScalingMetricSpecification
@Stability(Stable) public CfnScalingPlan.TargetTrackingConfigurationProperty.Builder customizedScalingMetricSpecification(CfnScalingPlan.CustomizedScalingMetricSpecificationProperty customizedScalingMetricSpecification) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getCustomizedScalingMetricSpecification()
- Parameters:
customizedScalingMetricSpecification
- A customized metric. You can specify either a predefined metric or a customized metric.- Returns:
this
-
disableScaleIn
@Stability(Stable) public CfnScalingPlan.TargetTrackingConfigurationProperty.Builder disableScaleIn(Boolean disableScaleIn) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getDisableScaleIn()
- Parameters:
disableScaleIn
- Indicates whether scale in by the target tracking scaling policy is disabled. If the value istrue
, scale in is disabled and the target tracking scaling policy doesn't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable resource.The default value is
false
.- Returns:
this
-
disableScaleIn
@Stability(Stable) public CfnScalingPlan.TargetTrackingConfigurationProperty.Builder disableScaleIn(IResolvable disableScaleIn) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getDisableScaleIn()
- Parameters:
disableScaleIn
- Indicates whether scale in by the target tracking scaling policy is disabled. If the value istrue
, scale in is disabled and the target tracking scaling policy doesn't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable resource.The default value is
false
.- Returns:
this
-
estimatedInstanceWarmup
@Stability(Stable) public CfnScalingPlan.TargetTrackingConfigurationProperty.Builder estimatedInstanceWarmup(Number estimatedInstanceWarmup) - Parameters:
estimatedInstanceWarmup
- The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. This value is used only if the resource is an Auto Scaling group.- Returns:
this
-
predefinedScalingMetricSpecification
@Stability(Stable) public CfnScalingPlan.TargetTrackingConfigurationProperty.Builder predefinedScalingMetricSpecification(IResolvable predefinedScalingMetricSpecification) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getPredefinedScalingMetricSpecification()
- Parameters:
predefinedScalingMetricSpecification
- A predefined metric. You can specify either a predefined metric or a customized metric.- Returns:
this
-
predefinedScalingMetricSpecification
@Stability(Stable) public CfnScalingPlan.TargetTrackingConfigurationProperty.Builder predefinedScalingMetricSpecification(CfnScalingPlan.PredefinedScalingMetricSpecificationProperty predefinedScalingMetricSpecification) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getPredefinedScalingMetricSpecification()
- Parameters:
predefinedScalingMetricSpecification
- A predefined metric. You can specify either a predefined metric or a customized metric.- Returns:
this
-
scaleInCooldown
@Stability(Stable) public CfnScalingPlan.TargetTrackingConfigurationProperty.Builder scaleInCooldown(Number scaleInCooldown) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getScaleInCooldown()
- Parameters:
scaleInCooldown
- The amount of time, in seconds, after a scale-in activity completes before another scale in activity can start. This value is not used if the scalable resource is an Auto Scaling group.- Returns:
this
-
scaleOutCooldown
@Stability(Stable) public CfnScalingPlan.TargetTrackingConfigurationProperty.Builder scaleOutCooldown(Number scaleOutCooldown) Sets the value ofCfnScalingPlan.TargetTrackingConfigurationProperty.getScaleOutCooldown()
- Parameters:
scaleOutCooldown
- The amount of time, in seconds, after a scale-out activity completes before another scale-out activity can start. This value is not used if the scalable resource is an Auto Scaling group.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnScalingPlan.TargetTrackingConfigurationProperty>
- Returns:
- a new instance of
CfnScalingPlan.TargetTrackingConfigurationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-