Class CfnLayerPropsMixin.AutoScalingThresholdsProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.opsworks.CfnLayerPropsMixin.AutoScalingThresholdsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLayerPropsMixin.AutoScalingThresholdsProperty>
- Enclosing interface:
CfnLayerPropsMixin.AutoScalingThresholdsProperty
@Stability(Stable)
public static final class CfnLayerPropsMixin.AutoScalingThresholdsProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLayerPropsMixin.AutoScalingThresholdsProperty>
A builder for
CfnLayerPropsMixin.AutoScalingThresholdsProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.cpuThreshold(Number cpuThreshold) Sets the value ofCfnLayerPropsMixin.AutoScalingThresholdsProperty.getCpuThreshold()ignoreMetricsTime(Number ignoreMetricsTime) Sets the value ofCfnLayerPropsMixin.AutoScalingThresholdsProperty.getIgnoreMetricsTime()instanceCount(Number instanceCount) Sets the value ofCfnLayerPropsMixin.AutoScalingThresholdsProperty.getInstanceCount()loadThreshold(Number loadThreshold) Sets the value ofCfnLayerPropsMixin.AutoScalingThresholdsProperty.getLoadThreshold()memoryThreshold(Number memoryThreshold) Sets the value ofCfnLayerPropsMixin.AutoScalingThresholdsProperty.getMemoryThreshold()thresholdsWaitTime(Number thresholdsWaitTime) Sets the value ofCfnLayerPropsMixin.AutoScalingThresholdsProperty.getThresholdsWaitTime()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cpuThreshold
@Stability(Stable) public CfnLayerPropsMixin.AutoScalingThresholdsProperty.Builder cpuThreshold(Number cpuThreshold) Sets the value ofCfnLayerPropsMixin.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 CfnLayerPropsMixin.AutoScalingThresholdsProperty.Builder ignoreMetricsTime(Number ignoreMetricsTime) Sets the value ofCfnLayerPropsMixin.AutoScalingThresholdsProperty.getIgnoreMetricsTime()- Parameters:
ignoreMetricsTime- The amount of time (in minutes) after a scaling event occurs that OpsWorks Stacks should ignore metrics and suppress additional scaling events. For example, 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.IgnoreMetricsTimeallows you to direct OpsWorks Stacks to suppress scaling events long enough to get the new instances online.- Returns:
this
-
instanceCount
@Stability(Stable) public CfnLayerPropsMixin.AutoScalingThresholdsProperty.Builder instanceCount(Number instanceCount) Sets the value ofCfnLayerPropsMixin.AutoScalingThresholdsProperty.getInstanceCount()- Parameters:
instanceCount- The number of instances to add or remove when the load exceeds a threshold.- Returns:
this
-
loadThreshold
@Stability(Stable) public CfnLayerPropsMixin.AutoScalingThresholdsProperty.Builder loadThreshold(Number loadThreshold) Sets the value ofCfnLayerPropsMixin.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 CfnLayerPropsMixin.AutoScalingThresholdsProperty.Builder memoryThreshold(Number memoryThreshold) Sets the value ofCfnLayerPropsMixin.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 CfnLayerPropsMixin.AutoScalingThresholdsProperty.Builder thresholdsWaitTime(Number thresholdsWaitTime) Sets the value ofCfnLayerPropsMixin.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:
buildin interfacesoftware.amazon.jsii.Builder<CfnLayerPropsMixin.AutoScalingThresholdsProperty>- Returns:
- a new instance of
CfnLayerPropsMixin.AutoScalingThresholdsProperty - Throws:
NullPointerException- if any required attribute was not provided
-