Class 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:
    Serialized Form
    • Constructor Detail

      • CloudWatchAlarmConfiguration

        public CloudWatchAlarmConfiguration()
    • Method Detail

      • 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:
        ComparisonOperator
      • 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:
        ComparisonOperator
      • 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:
        ComparisonOperator
      • 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:
        ComparisonOperator
      • 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:
        ComparisonOperator
      • 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:
        Statistic
      • 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:
        Statistic
      • 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:
        Statistic
      • 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:
        Statistic
      • 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:
        Statistic
      • 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:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object