Class AutoScalingThresholds
- java.lang.Object
-
- com.amazonaws.services.opsworks.model.AutoScalingThresholds
-
- All Implemented Interfaces:
Serializable,Cloneable
public class AutoScalingThresholds extends Object implements Serializable, Cloneable
Describes a load-based auto scaling upscaling or downscaling threshold configuration, which specifies when AWS OpsWorks starts or stops load-based instances.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AutoScalingThresholds()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AutoScalingThresholdsclone()booleanequals(Object obj)List<String>getAlarms()Custom Cloudwatch auto scaling alarms, to be used as thresholds.DoublegetCpuThreshold()The CPU utilization threshold, as a percent of the available CPU.IntegergetIgnoreMetricsTime()The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events.IntegergetInstanceCount()The number of instances to add or remove when the load exceeds a threshold.DoublegetLoadThreshold()The load threshold.DoublegetMemoryThreshold()The memory utilization threshold, as a percent of the available memory.IntegergetThresholdsWaitTime()The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.inthashCode()voidsetAlarms(Collection<String> alarms)Custom Cloudwatch auto scaling alarms, to be used as thresholds.voidsetCpuThreshold(Double cpuThreshold)The CPU utilization threshold, as a percent of the available CPU.voidsetIgnoreMetricsTime(Integer ignoreMetricsTime)The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events.voidsetInstanceCount(Integer instanceCount)The number of instances to add or remove when the load exceeds a threshold.voidsetLoadThreshold(Double loadThreshold)The load threshold.voidsetMemoryThreshold(Double memoryThreshold)The memory utilization threshold, as a percent of the available memory.voidsetThresholdsWaitTime(Integer thresholdsWaitTime)The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.StringtoString()Returns a string representation of this object; useful for testing and debugging.AutoScalingThresholdswithAlarms(String... alarms)Custom Cloudwatch auto scaling alarms, to be used as thresholds.AutoScalingThresholdswithAlarms(Collection<String> alarms)Custom Cloudwatch auto scaling alarms, to be used as thresholds.AutoScalingThresholdswithCpuThreshold(Double cpuThreshold)The CPU utilization threshold, as a percent of the available CPU.AutoScalingThresholdswithIgnoreMetricsTime(Integer ignoreMetricsTime)The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events.AutoScalingThresholdswithInstanceCount(Integer instanceCount)The number of instances to add or remove when the load exceeds a threshold.AutoScalingThresholdswithLoadThreshold(Double loadThreshold)The load threshold.AutoScalingThresholdswithMemoryThreshold(Double memoryThreshold)The memory utilization threshold, as a percent of the available memory.AutoScalingThresholdswithThresholdsWaitTime(Integer thresholdsWaitTime)The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
-
-
-
Method Detail
-
setInstanceCount
public void setInstanceCount(Integer instanceCount)
The number of instances to add or remove when the load exceeds a threshold.
- Parameters:
instanceCount- The number of instances to add or remove when the load exceeds a threshold.
-
getInstanceCount
public Integer getInstanceCount()
The number of instances to add or remove when the load exceeds a threshold.
- Returns:
- The number of instances to add or remove when the load exceeds a threshold.
-
withInstanceCount
public AutoScalingThresholds withInstanceCount(Integer instanceCount)
The number of instances to add or remove when the load exceeds a threshold.
- Parameters:
instanceCount- The number of instances to add or remove when the load exceeds a threshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setThresholdsWaitTime
public void setThresholdsWaitTime(Integer thresholdsWaitTime)
The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
- Parameters:
thresholdsWaitTime- The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
-
getThresholdsWaitTime
public Integer getThresholdsWaitTime()
The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
- Returns:
- The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
-
withThresholdsWaitTime
public AutoScalingThresholds withThresholdsWaitTime(Integer thresholdsWaitTime)
The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
- Parameters:
thresholdsWaitTime- The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIgnoreMetricsTime
public void setIgnoreMetricsTime(Integer ignoreMetricsTime)
The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks 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 AWS OpsWorks to suppress scaling events long enough to get the new instances online.- Parameters:
ignoreMetricsTime- The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks 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 AWS OpsWorks to suppress scaling events long enough to get the new instances online.
-
getIgnoreMetricsTime
public Integer getIgnoreMetricsTime()
The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks 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 AWS OpsWorks to suppress scaling events long enough to get the new instances online.- Returns:
- The amount of time (in minutes) after a scaling event occurs that
AWS OpsWorks should ignore metrics and suppress additional
scaling events. For example, AWS OpsWorks 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 AWS OpsWorks to suppress scaling events long enough to get the new instances online.
-
withIgnoreMetricsTime
public AutoScalingThresholds withIgnoreMetricsTime(Integer ignoreMetricsTime)
The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks 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 AWS OpsWorks to suppress scaling events long enough to get the new instances online.- Parameters:
ignoreMetricsTime- The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks 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 AWS OpsWorks to suppress scaling events long enough to get the new instances online.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCpuThreshold
public void setCpuThreshold(Double cpuThreshold)
The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
- Parameters:
cpuThreshold- The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
-
getCpuThreshold
public Double getCpuThreshold()
The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
- Returns:
- The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
-
withCpuThreshold
public AutoScalingThresholds withCpuThreshold(Double cpuThreshold)
The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
- Parameters:
cpuThreshold- The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMemoryThreshold
public void setMemoryThreshold(Double memoryThreshold)
The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
- Parameters:
memoryThreshold- The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
-
getMemoryThreshold
public Double getMemoryThreshold()
The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
- Returns:
- The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
-
withMemoryThreshold
public AutoScalingThresholds withMemoryThreshold(Double memoryThreshold)
The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
- Parameters:
memoryThreshold- The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLoadThreshold
public void setLoadThreshold(Double loadThreshold)
The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).
- Parameters:
loadThreshold- The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).
-
getLoadThreshold
public Double getLoadThreshold()
The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).
- Returns:
- The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).
-
withLoadThreshold
public AutoScalingThresholds withLoadThreshold(Double loadThreshold)
The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).
- Parameters:
loadThreshold- The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getAlarms
public List<String> getAlarms()
Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.- Returns:
- Custom Cloudwatch auto scaling alarms, to be used as thresholds.
This parameter takes a list of up to five alarm names, which are
case sensitive and must be in the same region as the stack.
To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.
-
setAlarms
public void setAlarms(Collection<String> alarms)
Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.- Parameters:
alarms- Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.
-
withAlarms
public AutoScalingThresholds withAlarms(String... alarms)
Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.NOTE: This method appends the values to the existing list (if any). Use
setAlarms(java.util.Collection)orwithAlarms(java.util.Collection)if you want to override the existing values.- Parameters:
alarms- Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withAlarms
public AutoScalingThresholds withAlarms(Collection<String> alarms)
Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.- Parameters:
alarms- Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have AWS OpsWorks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks to Act on Your Behalf.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public AutoScalingThresholds clone()
-
-