Class CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScalingPolicy.TargetTrackingConfigurationProperty>
- Enclosing interface:
CfnScalingPolicy.TargetTrackingConfigurationProperty
@Stability(Stable)
public static final class CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnScalingPolicy.TargetTrackingConfigurationProperty>
A builder for
CfnScalingPolicy.TargetTrackingConfigurationProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.customizedMetricSpecification
(IResolvable customizedMetricSpecification) customizedMetricSpecification
(CfnScalingPolicy.CustomizedMetricSpecificationProperty customizedMetricSpecification) disableScaleIn
(Boolean disableScaleIn) Sets the value ofCfnScalingPolicy.TargetTrackingConfigurationProperty.getDisableScaleIn()
disableScaleIn
(IResolvable disableScaleIn) Sets the value ofCfnScalingPolicy.TargetTrackingConfigurationProperty.getDisableScaleIn()
predefinedMetricSpecification
(IResolvable predefinedMetricSpecification) predefinedMetricSpecification
(CfnScalingPolicy.PredefinedMetricSpecificationProperty predefinedMetricSpecification) targetValue
(Number targetValue) Sets the value ofCfnScalingPolicy.TargetTrackingConfigurationProperty.getTargetValue()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
targetValue
@Stability(Stable) public CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder targetValue(Number targetValue) Sets the value ofCfnScalingPolicy.TargetTrackingConfigurationProperty.getTargetValue()
- Parameters:
targetValue
- The target value for the metric. This parameter is required.Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.
- Returns:
this
-
customizedMetricSpecification
@Stability(Stable) public CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder customizedMetricSpecification(IResolvable customizedMetricSpecification) Sets the value ofCfnScalingPolicy.TargetTrackingConfigurationProperty.getCustomizedMetricSpecification()
- Parameters:
customizedMetricSpecification
- A customized metric. You must specify either a predefined metric or a customized metric.- Returns:
this
-
customizedMetricSpecification
@Stability(Stable) public CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder customizedMetricSpecification(CfnScalingPolicy.CustomizedMetricSpecificationProperty customizedMetricSpecification) Sets the value ofCfnScalingPolicy.TargetTrackingConfigurationProperty.getCustomizedMetricSpecification()
- Parameters:
customizedMetricSpecification
- A customized metric. You must specify either a predefined metric or a customized metric.- Returns:
this
-
disableScaleIn
@Stability(Stable) public CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder disableScaleIn(Boolean disableScaleIn) Sets the value ofCfnScalingPolicy.TargetTrackingConfigurationProperty.getDisableScaleIn()
- Parameters:
disableScaleIn
- Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled, the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target tracking scaling policy can remove instances from the Auto Scaling group. The default isfalse
.- Returns:
this
-
disableScaleIn
@Stability(Stable) public CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder disableScaleIn(IResolvable disableScaleIn) Sets the value ofCfnScalingPolicy.TargetTrackingConfigurationProperty.getDisableScaleIn()
- Parameters:
disableScaleIn
- Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled, the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target tracking scaling policy can remove instances from the Auto Scaling group. The default isfalse
.- Returns:
this
-
predefinedMetricSpecification
@Stability(Stable) public CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder predefinedMetricSpecification(IResolvable predefinedMetricSpecification) Sets the value ofCfnScalingPolicy.TargetTrackingConfigurationProperty.getPredefinedMetricSpecification()
- Parameters:
predefinedMetricSpecification
- A predefined metric. You must specify either a predefined metric or a customized metric.- Returns:
this
-
predefinedMetricSpecification
@Stability(Stable) public CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder predefinedMetricSpecification(CfnScalingPolicy.PredefinedMetricSpecificationProperty predefinedMetricSpecification) Sets the value ofCfnScalingPolicy.TargetTrackingConfigurationProperty.getPredefinedMetricSpecification()
- Parameters:
predefinedMetricSpecification
- A predefined metric. You must specify either a predefined metric or a customized metric.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnScalingPolicy.TargetTrackingConfigurationProperty>
- Returns:
- a new instance of
CfnScalingPolicy.TargetTrackingConfigurationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-