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:
  • Constructor Details

    • AutoScalingThresholds

      public AutoScalingThresholds()
  • Method Details

    • 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. IgnoreMetricsTime allows 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. IgnoreMetricsTime allows 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. IgnoreMetricsTime allows 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. IgnoreMetricsTime allows 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. IgnoreMetricsTime allows 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. IgnoreMetricsTime allows 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) or withAlarms(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:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public AutoScalingThresholds clone()
      Overrides:
      clone in class Object