Class CfnLayer.AutoScalingThresholdsProperty.Builder
java.lang.Object
software.amazon.awscdk.services.opsworks.CfnLayer.AutoScalingThresholdsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLayer.AutoScalingThresholdsProperty>
- Enclosing interface:
CfnLayer.AutoScalingThresholdsProperty
@Stability(Stable)
public static final class CfnLayer.AutoScalingThresholdsProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLayer.AutoScalingThresholdsProperty>
A builder for
CfnLayer.AutoScalingThresholdsProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.cpuThreshold
(Number cpuThreshold) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getCpuThreshold()
ignoreMetricsTime
(Number ignoreMetricsTime) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getIgnoreMetricsTime()
instanceCount
(Number instanceCount) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getInstanceCount()
loadThreshold
(Number loadThreshold) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getLoadThreshold()
memoryThreshold
(Number memoryThreshold) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getMemoryThreshold()
thresholdsWaitTime
(Number thresholdsWaitTime) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getThresholdsWaitTime()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cpuThreshold
@Stability(Stable) public CfnLayer.AutoScalingThresholdsProperty.Builder cpuThreshold(Number cpuThreshold) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getCpuThreshold()
- Parameters:
cpuThreshold
- The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.- Returns:
this
-
ignoreMetricsTime
@Stability(Stable) public CfnLayer.AutoScalingThresholdsProperty.Builder ignoreMetricsTime(Number ignoreMetricsTime) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getIgnoreMetricsTime()
- Parameters:
ignoreMetricsTime
- The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks Stacks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks Stacks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes.IgnoreMetricsTime
allows you to direct AWS OpsWorks Stacks to suppress scaling events long enough to get the new instances online.- Returns:
this
-
instanceCount
@Stability(Stable) public CfnLayer.AutoScalingThresholdsProperty.Builder instanceCount(Number instanceCount) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getInstanceCount()
- Parameters:
instanceCount
- The number of instances to add or remove when the load exceeds a threshold.- Returns:
this
-
loadThreshold
@Stability(Stable) public CfnLayer.AutoScalingThresholdsProperty.Builder loadThreshold(Number loadThreshold) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getLoadThreshold()
- Parameters:
loadThreshold
- The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing) .- Returns:
this
-
memoryThreshold
@Stability(Stable) public CfnLayer.AutoScalingThresholdsProperty.Builder memoryThreshold(Number memoryThreshold) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getMemoryThreshold()
- Parameters:
memoryThreshold
- The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.- Returns:
this
-
thresholdsWaitTime
@Stability(Stable) public CfnLayer.AutoScalingThresholdsProperty.Builder thresholdsWaitTime(Number thresholdsWaitTime) Sets the value ofCfnLayer.AutoScalingThresholdsProperty.getThresholdsWaitTime()
- Parameters:
thresholdsWaitTime
- The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLayer.AutoScalingThresholdsProperty>
- Returns:
- a new instance of
CfnLayer.AutoScalingThresholdsProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-