Class CloudWatchAlarmConfiguration

java.lang.Object
com.amazonaws.services.route53.model.CloudWatchAlarmConfiguration
All Implemented Interfaces:
Serializable, Cloneable

public class CloudWatchAlarmConfiguration extends Object implements Serializable, Cloneable

For CLOUDWATCH_METRIC health checks, a complex type that contains information about the CloudWatch alarm that you're associating with the health check.

See Also:
  • Constructor Details

    • CloudWatchAlarmConfiguration

      public CloudWatchAlarmConfiguration()
  • Method Details

    • setEvaluationPeriods

      public void setEvaluationPeriods(Integer evaluationPeriods)

      The number of periods over which data is compared to the specified threshold.

      Parameters:
      evaluationPeriods - The number of periods over which data is compared to the specified threshold.
    • getEvaluationPeriods

      public Integer getEvaluationPeriods()

      The number of periods over which data is compared to the specified threshold.

      Returns:
      The number of periods over which data is compared to the specified threshold.
    • withEvaluationPeriods

      public CloudWatchAlarmConfiguration withEvaluationPeriods(Integer evaluationPeriods)

      The number of periods over which data is compared to the specified threshold.

      Parameters:
      evaluationPeriods - The number of periods over which data is compared to the specified threshold.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setThreshold

      public void setThreshold(Double threshold)

      The value that the metric is compared with to determine the state of the alarm. For example, if you want the health check to fail if the average TCP connection time is greater than 500 milliseconds for more than 60 seconds, the threshold is 500.

      Parameters:
      threshold - The value that the metric is compared with to determine the state of the alarm. For example, if you want the health check to fail if the average TCP connection time is greater than 500 milliseconds for more than 60 seconds, the threshold is 500.
    • getThreshold

      public Double getThreshold()

      The value that the metric is compared with to determine the state of the alarm. For example, if you want the health check to fail if the average TCP connection time is greater than 500 milliseconds for more than 60 seconds, the threshold is 500.

      Returns:
      The value that the metric is compared with to determine the state of the alarm. For example, if you want the health check to fail if the average TCP connection time is greater than 500 milliseconds for more than 60 seconds, the threshold is 500.
    • withThreshold

      public CloudWatchAlarmConfiguration withThreshold(Double threshold)

      The value that the metric is compared with to determine the state of the alarm. For example, if you want the health check to fail if the average TCP connection time is greater than 500 milliseconds for more than 60 seconds, the threshold is 500.

      Parameters:
      threshold - The value that the metric is compared with to determine the state of the alarm. For example, if you want the health check to fail if the average TCP connection time is greater than 500 milliseconds for more than 60 seconds, the threshold is 500.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setComparisonOperator

      public void setComparisonOperator(String comparisonOperator)

      The arithmetic operation to use when comparing the specified Statistic and Threshold.

      Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold and LessThanOrEqualToThreshold

      Parameters:
      comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold.

      Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold and LessThanOrEqualToThreshold

      See Also:
    • getComparisonOperator

      public String getComparisonOperator()

      The arithmetic operation to use when comparing the specified Statistic and Threshold.

      Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold and LessThanOrEqualToThreshold

      Returns:
      The arithmetic operation to use when comparing the specified Statistic and Threshold.

      Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold and LessThanOrEqualToThreshold

      See Also:
    • withComparisonOperator

      public CloudWatchAlarmConfiguration withComparisonOperator(String comparisonOperator)

      The arithmetic operation to use when comparing the specified Statistic and Threshold.

      Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold and LessThanOrEqualToThreshold

      Parameters:
      comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold.

      Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold and LessThanOrEqualToThreshold

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setComparisonOperator

      public void setComparisonOperator(ComparisonOperator comparisonOperator)

      The arithmetic operation to use when comparing the specified Statistic and Threshold.

      Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold and LessThanOrEqualToThreshold

      Parameters:
      comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold.

      Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold and LessThanOrEqualToThreshold

      See Also:
    • withComparisonOperator

      public CloudWatchAlarmConfiguration withComparisonOperator(ComparisonOperator comparisonOperator)

      The arithmetic operation to use when comparing the specified Statistic and Threshold.

      Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold and LessThanOrEqualToThreshold

      Parameters:
      comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold.

      Valid Values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold and LessThanOrEqualToThreshold

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setPeriod

      public void setPeriod(Integer period)

      An integer that represents the period in seconds over which the statistic is applied.

      Parameters:
      period - An integer that represents the period in seconds over which the statistic is applied.
    • getPeriod

      public Integer getPeriod()

      An integer that represents the period in seconds over which the statistic is applied.

      Returns:
      An integer that represents the period in seconds over which the statistic is applied.
    • withPeriod

      public CloudWatchAlarmConfiguration withPeriod(Integer period)

      An integer that represents the period in seconds over which the statistic is applied.

      Parameters:
      period - An integer that represents the period in seconds over which the statistic is applied.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setMetricName

      public void setMetricName(String metricName)

      The name of the CloudWatch metric that is associated with the CloudWatch alarm.

      Parameters:
      metricName - The name of the CloudWatch metric that is associated with the CloudWatch alarm.
    • getMetricName

      public String getMetricName()

      The name of the CloudWatch metric that is associated with the CloudWatch alarm.

      Returns:
      The name of the CloudWatch metric that is associated with the CloudWatch alarm.
    • withMetricName

      public CloudWatchAlarmConfiguration withMetricName(String metricName)

      The name of the CloudWatch metric that is associated with the CloudWatch alarm.

      Parameters:
      metricName - The name of the CloudWatch metric that is associated with the CloudWatch alarm.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setNamespace

      public void setNamespace(String namespace)

      The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.

      Parameters:
      namespace - The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
    • getNamespace

      public String getNamespace()

      The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.

      Returns:
      The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
    • withNamespace

      public CloudWatchAlarmConfiguration withNamespace(String namespace)

      The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.

      Parameters:
      namespace - The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setStatistic

      public void setStatistic(String statistic)

      The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.

      Valid Values are SampleCount, Average, Sum, Minimum and Maximum

      Parameters:
      statistic - The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.

      Valid Values are SampleCount, Average, Sum, Minimum and Maximum

      See Also:
    • getStatistic

      public String getStatistic()

      The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.

      Valid Values are SampleCount, Average, Sum, Minimum and Maximum

      Returns:
      The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.

      Valid Values are SampleCount, Average, Sum, Minimum and Maximum

      See Also:
    • withStatistic

      public CloudWatchAlarmConfiguration withStatistic(String statistic)

      The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.

      Valid Values are SampleCount, Average, Sum, Minimum and Maximum

      Parameters:
      statistic - The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.

      Valid Values are SampleCount, Average, Sum, Minimum and Maximum

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setStatistic

      public void setStatistic(Statistic statistic)

      The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.

      Valid Values are SampleCount, Average, Sum, Minimum and Maximum

      Parameters:
      statistic - The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.

      Valid Values are SampleCount, Average, Sum, Minimum and Maximum

      See Also:
    • withStatistic

      public CloudWatchAlarmConfiguration withStatistic(Statistic statistic)

      The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.

      Valid Values are SampleCount, Average, Sum, Minimum and Maximum

      Parameters:
      statistic - The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.

      Valid Values are SampleCount, Average, Sum, Minimum and Maximum

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • getDimensions

      public List<Dimension> getDimensions()

      A list of Dimension elements for the CloudWatch metric that is associated with the CloudWatch alarm. For information about the metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.

      Returns:
      A list of Dimension elements for the CloudWatch metric that is associated with the CloudWatch alarm. For information about the metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.
    • setDimensions

      public void setDimensions(Collection<Dimension> dimensions)

      A list of Dimension elements for the CloudWatch metric that is associated with the CloudWatch alarm. For information about the metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.

      Parameters:
      dimensions - A list of Dimension elements for the CloudWatch metric that is associated with the CloudWatch alarm. For information about the metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.
    • withDimensions

      public CloudWatchAlarmConfiguration withDimensions(Dimension... dimensions)

      A list of Dimension elements for the CloudWatch metric that is associated with the CloudWatch alarm. For information about the metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.

      NOTE: This method appends the values to the existing list (if any). Use setDimensions(java.util.Collection) or withDimensions(java.util.Collection) if you want to override the existing values.

      Parameters:
      dimensions - A list of Dimension elements for the CloudWatch metric that is associated with the CloudWatch alarm. For information about the metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withDimensions

      public CloudWatchAlarmConfiguration withDimensions(Collection<Dimension> dimensions)

      A list of Dimension elements for the CloudWatch metric that is associated with the CloudWatch alarm. For information about the metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.

      Parameters:
      dimensions - A list of Dimension elements for the CloudWatch metric that is associated with the CloudWatch alarm. For information about the metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.
      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

      Overrides:
      clone in class Object