libZSservicesZSamazonka-lightsailZSamazonka-lightsail
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Lightsail.Types.Alarm

Description

 
Synopsis

Documentation

data Alarm Source #

Describes an alarm.

An alarm is a way to monitor your Lightsail resource metrics. For more information, see Alarms in Amazon Lightsail.

See: newAlarm smart constructor.

Constructors

Alarm' 

Fields

  • state :: Maybe AlarmState

    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.
  • treatMissingData :: Maybe 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.
  • resourceType :: Maybe ResourceType

    The Lightsail resource type (e.g., Alarm).

  • arn :: Maybe Text

    The Amazon Resource Name (ARN) of the alarm.

  • createdAt :: Maybe POSIX

    The timestamp when the alarm was created.

  • location :: Maybe ResourceLocation

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

  • contactProtocols :: Maybe [ContactProtocol]

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

  • period :: Maybe Natural

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

  • evaluationPeriods :: Maybe Int

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

  • metricName :: Maybe MetricName

    The name of the metric associated with the alarm.

  • comparisonOperator :: Maybe ComparisonOperator

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

  • name :: Maybe Text

    The name of the alarm.

  • threshold :: Maybe Double

    The value against which the specified statistic is compared.

  • datapointsToAlarm :: Maybe Int

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

  • supportCode :: Maybe Text

    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.

  • notificationEnabled :: Maybe Bool

    Indicates whether the alarm is enabled.

  • notificationTriggers :: Maybe [AlarmState]

    The alarm states that trigger a notification.

  • statistic :: Maybe MetricStatistic

    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.
  • unit :: Maybe MetricUnit

    The unit of the metric associated with the alarm.

  • monitoredResourceInfo :: Maybe MonitoredResourceInfo

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

Instances

Instances details
Eq Alarm Source # 
Instance details

Defined in Amazonka.Lightsail.Types.Alarm

Methods

(==) :: Alarm -> Alarm -> Bool #

(/=) :: Alarm -> Alarm -> Bool #

Read Alarm Source # 
Instance details

Defined in Amazonka.Lightsail.Types.Alarm

Show Alarm Source # 
Instance details

Defined in Amazonka.Lightsail.Types.Alarm

Methods

showsPrec :: Int -> Alarm -> ShowS #

show :: Alarm -> String #

showList :: [Alarm] -> ShowS #

Generic Alarm Source # 
Instance details

Defined in Amazonka.Lightsail.Types.Alarm

Associated Types

type Rep Alarm :: Type -> Type #

Methods

from :: Alarm -> Rep Alarm x #

to :: Rep Alarm x -> Alarm #

NFData Alarm Source # 
Instance details

Defined in Amazonka.Lightsail.Types.Alarm

Methods

rnf :: Alarm -> () #

Hashable Alarm Source # 
Instance details

Defined in Amazonka.Lightsail.Types.Alarm

Methods

hashWithSalt :: Int -> Alarm -> Int #

hash :: Alarm -> Int #

FromJSON Alarm Source # 
Instance details

Defined in Amazonka.Lightsail.Types.Alarm

type Rep Alarm Source # 
Instance details

Defined in Amazonka.Lightsail.Types.Alarm

type Rep Alarm = D1 ('MetaData "Alarm" "Amazonka.Lightsail.Types.Alarm" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "Alarm'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AlarmState)) :*: S1 ('MetaSel ('Just "treatMissingData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TreatMissingData))) :*: (S1 ('MetaSel ('Just "resourceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ResourceType)) :*: (S1 ('MetaSel ('Just "arn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "createdAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX))))) :*: ((S1 ('MetaSel ('Just "location") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ResourceLocation)) :*: S1 ('MetaSel ('Just "contactProtocols") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ContactProtocol]))) :*: (S1 ('MetaSel ('Just "period") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: (S1 ('MetaSel ('Just "evaluationPeriods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "metricName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MetricName)))))) :*: (((S1 ('MetaSel ('Just "comparisonOperator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ComparisonOperator)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "threshold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Double)) :*: (S1 ('MetaSel ('Just "datapointsToAlarm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "supportCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "notificationEnabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "notificationTriggers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [AlarmState]))) :*: (S1 ('MetaSel ('Just "statistic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MetricStatistic)) :*: (S1 ('MetaSel ('Just "unit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MetricUnit)) :*: S1 ('MetaSel ('Just "monitoredResourceInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MonitoredResourceInfo))))))))

newAlarm :: Alarm Source #

Create a value of Alarm with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:state:Alarm', alarm_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.

$sel:treatMissingData:Alarm', alarm_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.

$sel:resourceType:Alarm', alarm_resourceType - The Lightsail resource type (e.g., Alarm).

$sel:arn:Alarm', alarm_arn - The Amazon Resource Name (ARN) of the alarm.

$sel:createdAt:Alarm', alarm_createdAt - The timestamp when the alarm was created.

$sel:location:Alarm', alarm_location - An object that lists information about the location of the alarm.

$sel:contactProtocols:Alarm', alarm_contactProtocols - The contact protocols for the alarm, such as Email, SMS (text messaging), or both.

$sel:period:Alarm', alarm_period - The period, in seconds, over which the statistic is applied.

$sel:evaluationPeriods:Alarm', alarm_evaluationPeriods - The number of periods over which data is compared to the specified threshold.

$sel:metricName:Alarm', alarm_metricName - The name of the metric associated with the alarm.

$sel:comparisonOperator:Alarm', alarm_comparisonOperator - The arithmetic operation used when comparing the specified statistic and threshold.

$sel:name:Alarm', alarm_name - The name of the alarm.

$sel:threshold:Alarm', alarm_threshold - The value against which the specified statistic is compared.

$sel:datapointsToAlarm:Alarm', alarm_datapointsToAlarm - The number of data points that must not within the specified threshold to trigger the alarm.

$sel:supportCode:Alarm', alarm_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.

$sel:notificationEnabled:Alarm', alarm_notificationEnabled - Indicates whether the alarm is enabled.

$sel:notificationTriggers:Alarm', alarm_notificationTriggers - The alarm states that trigger a notification.

$sel:statistic:Alarm', alarm_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.

$sel:unit:Alarm', alarm_unit - The unit of the metric associated with the alarm.

$sel:monitoredResourceInfo:Alarm', alarm_monitoredResourceInfo - An object that lists information about the resource monitored by the alarm.

alarm_state :: Lens' Alarm (Maybe AlarmState) Source #

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.

alarm_treatMissingData :: Lens' Alarm (Maybe TreatMissingData) Source #

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.

alarm_resourceType :: Lens' Alarm (Maybe ResourceType) Source #

The Lightsail resource type (e.g., Alarm).

alarm_arn :: Lens' Alarm (Maybe Text) Source #

The Amazon Resource Name (ARN) of the alarm.

alarm_createdAt :: Lens' Alarm (Maybe UTCTime) Source #

The timestamp when the alarm was created.

alarm_location :: Lens' Alarm (Maybe ResourceLocation) Source #

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

alarm_contactProtocols :: Lens' Alarm (Maybe [ContactProtocol]) Source #

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

alarm_period :: Lens' Alarm (Maybe Natural) Source #

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

alarm_evaluationPeriods :: Lens' Alarm (Maybe Int) Source #

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

alarm_metricName :: Lens' Alarm (Maybe MetricName) Source #

The name of the metric associated with the alarm.

alarm_comparisonOperator :: Lens' Alarm (Maybe ComparisonOperator) Source #

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

alarm_name :: Lens' Alarm (Maybe Text) Source #

The name of the alarm.

alarm_threshold :: Lens' Alarm (Maybe Double) Source #

The value against which the specified statistic is compared.

alarm_datapointsToAlarm :: Lens' Alarm (Maybe Int) Source #

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

alarm_supportCode :: Lens' Alarm (Maybe Text) Source #

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.

alarm_notificationEnabled :: Lens' Alarm (Maybe Bool) Source #

Indicates whether the alarm is enabled.

alarm_notificationTriggers :: Lens' Alarm (Maybe [AlarmState]) Source #

The alarm states that trigger a notification.

alarm_statistic :: Lens' Alarm (Maybe MetricStatistic) Source #

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.

alarm_unit :: Lens' Alarm (Maybe MetricUnit) Source #

The unit of the metric associated with the alarm.

alarm_monitoredResourceInfo :: Lens' Alarm (Maybe MonitoredResourceInfo) Source #

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