Class CpuUtilizationScalingProps.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.CpuUtilizationScalingProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CpuUtilizationScalingProps>
- Enclosing interface:
CpuUtilizationScalingProps
@Stability(Stable)
public static final class CpuUtilizationScalingProps.Builder
extends Object
implements software.amazon.jsii.Builder<CpuUtilizationScalingProps>
A builder for
CpuUtilizationScalingProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofBaseTargetTrackingProps.getCooldown()
disableScaleIn
(Boolean disableScaleIn) Sets the value ofBaseTargetTrackingProps.getDisableScaleIn()
estimatedInstanceWarmup
(Duration estimatedInstanceWarmup) Sets the value ofBaseTargetTrackingProps.getEstimatedInstanceWarmup()
targetUtilizationPercent
(Number targetUtilizationPercent) Sets the value ofCpuUtilizationScalingProps.getTargetUtilizationPercent()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
targetUtilizationPercent
@Stability(Stable) public CpuUtilizationScalingProps.Builder targetUtilizationPercent(Number targetUtilizationPercent) Sets the value ofCpuUtilizationScalingProps.getTargetUtilizationPercent()
- Parameters:
targetUtilizationPercent
- Target average CPU utilization across the task. This parameter is required.- Returns:
this
-
cooldown
Sets the value ofBaseTargetTrackingProps.getCooldown()
- Parameters:
cooldown
- Period after a scaling completes before another scaling activity can start.- Returns:
this
-
disableScaleIn
Sets the value ofBaseTargetTrackingProps.getDisableScaleIn()
- Parameters:
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.- Returns:
this
-
estimatedInstanceWarmup
@Stability(Stable) public CpuUtilizationScalingProps.Builder estimatedInstanceWarmup(Duration estimatedInstanceWarmup) Sets the value ofBaseTargetTrackingProps.getEstimatedInstanceWarmup()
- Parameters:
estimatedInstanceWarmup
- Estimated time until a newly launched instance can send metrics to CloudWatch.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CpuUtilizationScalingProps>
- Returns:
- a new instance of
CpuUtilizationScalingProps
- Throws:
NullPointerException
- if any required attribute was not provided
-