Interface Alarm.Builder

    • Method Detail

      • name

        Alarm.Builder name​(String name)

        The name of the alarm.

        Parameters:
        name - The name of the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • arn

        Alarm.Builder arn​(String arn)

        The Amazon Resource Name (ARN) of the alarm.

        Parameters:
        arn - The Amazon Resource Name (ARN) of the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • createdAt

        Alarm.Builder createdAt​(Instant createdAt)

        The timestamp when the alarm was created.

        Parameters:
        createdAt - The timestamp when the alarm was created.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • location

        Alarm.Builder location​(ResourceLocation location)

        An object that lists information about the location of the alarm.

        Parameters:
        location - An object that lists information about the location of the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • resourceType

        Alarm.Builder resourceType​(String resourceType)

        The Lightsail resource type of the alarm.

        Parameters:
        resourceType - The Lightsail resource type of the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ResourceType, ResourceType
      • resourceType

        Alarm.Builder resourceType​(ResourceType resourceType)

        The Lightsail resource type of the alarm.

        Parameters:
        resourceType - The Lightsail resource type of the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ResourceType, ResourceType
      • supportCode

        Alarm.Builder supportCode​(String supportCode)

        The support code. Include this code in your email to support when you have questions about your Lightsail alarm. This code enables our support team to look up your Lightsail information more easily.

        Parameters:
        supportCode - The support code. Include this code in your email to support when you have questions about your Lightsail alarm. This code enables our support team to look up your Lightsail information more easily.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • monitoredResourceInfo

        Alarm.Builder monitoredResourceInfo​(MonitoredResourceInfo monitoredResourceInfo)

        An object that lists information about the resource monitored by the alarm.

        Parameters:
        monitoredResourceInfo - An object that lists information about the resource monitored by the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • comparisonOperator

        Alarm.Builder comparisonOperator​(String comparisonOperator)

        The arithmetic operation used when comparing the specified statistic and threshold.

        Parameters:
        comparisonOperator - The arithmetic operation used when comparing the specified statistic and threshold.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ComparisonOperator, ComparisonOperator
      • comparisonOperator

        Alarm.Builder comparisonOperator​(ComparisonOperator comparisonOperator)

        The arithmetic operation used when comparing the specified statistic and threshold.

        Parameters:
        comparisonOperator - The arithmetic operation used when comparing the specified statistic and threshold.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ComparisonOperator, ComparisonOperator
      • evaluationPeriods

        Alarm.Builder evaluationPeriods​(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.
      • period

        Alarm.Builder period​(Integer period)

        The period, in seconds, over which the statistic is applied.

        Parameters:
        period - 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.
      • threshold

        Alarm.Builder threshold​(Double threshold)

        The value against which the specified statistic is compared.

        Parameters:
        threshold - The value against which the specified statistic is compared.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • datapointsToAlarm

        Alarm.Builder datapointsToAlarm​(Integer datapointsToAlarm)

        The number of data points that must not within the specified threshold to trigger the alarm.

        Parameters:
        datapointsToAlarm - The number of data points that must not within the specified threshold to trigger the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • treatMissingData

        Alarm.Builder treatMissingData​(String treatMissingData)

        Specifies how the alarm handles missing data points.

        An alarm can treat missing data in the following ways:

        • breaching - Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold.

        • notBreaching - Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold.

        • ignore - Ignore the missing data. Maintains the current alarm state.

        • missing - Missing data is treated as missing.

        Parameters:
        treatMissingData - Specifies how the alarm handles missing data points.

        An alarm can treat missing data in the following ways:

        • breaching - Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold.

        • notBreaching - Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold.

        • ignore - Ignore the missing data. Maintains the current alarm state.

        • missing - Missing data is treated as missing.

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

        Alarm.Builder treatMissingData​(TreatMissingData treatMissingData)

        Specifies how the alarm handles missing data points.

        An alarm can treat missing data in the following ways:

        • breaching - Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold.

        • notBreaching - Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold.

        • ignore - Ignore the missing data. Maintains the current alarm state.

        • missing - Missing data is treated as missing.

        Parameters:
        treatMissingData - Specifies how the alarm handles missing data points.

        An alarm can treat missing data in the following ways:

        • breaching - Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold.

        • notBreaching - Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold.

        • ignore - Ignore the missing data. Maintains the current alarm state.

        • missing - Missing data is treated as missing.

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

        Alarm.Builder statistic​(String statistic)

        The statistic for the metric associated with the alarm.

        The following statistics are available:

        • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

        • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

        • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

        • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

        • SampleCount - The count, or number, of data points used for the statistical calculation.

        Parameters:
        statistic - The statistic for the metric associated with the alarm.

        The following statistics are available:

        • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

        • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

        • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

        • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

        • SampleCount - The count, or number, of data points used for the statistical calculation.

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

        Alarm.Builder statistic​(MetricStatistic statistic)

        The statistic for the metric associated with the alarm.

        The following statistics are available:

        • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

        • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

        • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

        • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

        • SampleCount - The count, or number, of data points used for the statistical calculation.

        Parameters:
        statistic - The statistic for the metric associated with the alarm.

        The following statistics are available:

        • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

        • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

        • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

        • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

        • SampleCount - The count, or number, of data points used for the statistical calculation.

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

        Alarm.Builder metricName​(String metricName)

        The name of the metric associated with the alarm.

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

        Alarm.Builder metricName​(MetricName metricName)

        The name of the metric associated with the alarm.

        Parameters:
        metricName - The name of the metric associated with the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        MetricName, MetricName
      • state

        Alarm.Builder state​(String state)

        The current state of the alarm.

        An alarm has the following possible states:

        • ALARM - The metric is outside of the defined threshold.

        • INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.

        • OK - The metric is within the defined threshold.

        Parameters:
        state - The current state of the alarm.

        An alarm has the following possible states:

        • ALARM - The metric is outside of the defined threshold.

        • INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.

        • OK - The metric is within the defined threshold.

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

        Alarm.Builder state​(AlarmState state)

        The current state of the alarm.

        An alarm has the following possible states:

        • ALARM - The metric is outside of the defined threshold.

        • INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.

        • OK - The metric is within the defined threshold.

        Parameters:
        state - The current state of the alarm.

        An alarm has the following possible states:

        • ALARM - The metric is outside of the defined threshold.

        • INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.

        • OK - The metric is within the defined threshold.

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

        Alarm.Builder unit​(String unit)

        The unit of the metric associated with the alarm.

        Parameters:
        unit - The unit of the metric associated with the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        MetricUnit, MetricUnit
      • unit

        Alarm.Builder unit​(MetricUnit unit)

        The unit of the metric associated with the alarm.

        Parameters:
        unit - The unit of the metric associated with the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        MetricUnit, MetricUnit
      • contactProtocolsWithStrings

        Alarm.Builder contactProtocolsWithStrings​(Collection<String> contactProtocols)

        The contact protocols for the alarm, such as Email, SMS (text messaging), or both.

        Parameters:
        contactProtocols - The contact protocols for the alarm, such as Email, SMS (text messaging), or both.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • contactProtocolsWithStrings

        Alarm.Builder contactProtocolsWithStrings​(String... contactProtocols)

        The contact protocols for the alarm, such as Email, SMS (text messaging), or both.

        Parameters:
        contactProtocols - The contact protocols for the alarm, such as Email, SMS (text messaging), or both.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • contactProtocols

        Alarm.Builder contactProtocols​(Collection<ContactProtocol> contactProtocols)

        The contact protocols for the alarm, such as Email, SMS (text messaging), or both.

        Parameters:
        contactProtocols - The contact protocols for the alarm, such as Email, SMS (text messaging), or both.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • contactProtocols

        Alarm.Builder contactProtocols​(ContactProtocol... contactProtocols)

        The contact protocols for the alarm, such as Email, SMS (text messaging), or both.

        Parameters:
        contactProtocols - The contact protocols for the alarm, such as Email, SMS (text messaging), or both.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • notificationTriggersWithStrings

        Alarm.Builder notificationTriggersWithStrings​(Collection<String> notificationTriggers)

        The alarm states that trigger a notification.

        Parameters:
        notificationTriggers - The alarm states that trigger a notification.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • notificationTriggersWithStrings

        Alarm.Builder notificationTriggersWithStrings​(String... notificationTriggers)

        The alarm states that trigger a notification.

        Parameters:
        notificationTriggers - The alarm states that trigger a notification.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • notificationTriggers

        Alarm.Builder notificationTriggers​(Collection<AlarmState> notificationTriggers)

        The alarm states that trigger a notification.

        Parameters:
        notificationTriggers - The alarm states that trigger a notification.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • notificationTriggers

        Alarm.Builder notificationTriggers​(AlarmState... notificationTriggers)

        The alarm states that trigger a notification.

        Parameters:
        notificationTriggers - The alarm states that trigger a notification.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • notificationEnabled

        Alarm.Builder notificationEnabled​(Boolean notificationEnabled)

        Indicates whether the alarm is enabled.

        Parameters:
        notificationEnabled - Indicates whether the alarm is enabled.
        Returns:
        Returns a reference to this object so that method calls can be chained together.