Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data Alarm = Alarm' {
- arn :: Maybe Text
- comparisonOperator :: Maybe ComparisonOperator
- contactProtocols :: Maybe [ContactProtocol]
- createdAt :: Maybe POSIX
- datapointsToAlarm :: Maybe Int
- evaluationPeriods :: Maybe Int
- location :: Maybe ResourceLocation
- metricName :: Maybe MetricName
- monitoredResourceInfo :: Maybe MonitoredResourceInfo
- name :: Maybe Text
- notificationEnabled :: Maybe Bool
- notificationTriggers :: Maybe [AlarmState]
- period :: Maybe Natural
- resourceType :: Maybe ResourceType
- state :: Maybe AlarmState
- statistic :: Maybe MetricStatistic
- supportCode :: Maybe Text
- threshold :: Maybe Double
- treatMissingData :: Maybe TreatMissingData
- unit :: Maybe MetricUnit
- newAlarm :: Alarm
- alarm_arn :: Lens' Alarm (Maybe Text)
- alarm_comparisonOperator :: Lens' Alarm (Maybe ComparisonOperator)
- alarm_contactProtocols :: Lens' Alarm (Maybe [ContactProtocol])
- alarm_createdAt :: Lens' Alarm (Maybe UTCTime)
- alarm_datapointsToAlarm :: Lens' Alarm (Maybe Int)
- alarm_evaluationPeriods :: Lens' Alarm (Maybe Int)
- alarm_location :: Lens' Alarm (Maybe ResourceLocation)
- alarm_metricName :: Lens' Alarm (Maybe MetricName)
- alarm_monitoredResourceInfo :: Lens' Alarm (Maybe MonitoredResourceInfo)
- alarm_name :: Lens' Alarm (Maybe Text)
- alarm_notificationEnabled :: Lens' Alarm (Maybe Bool)
- alarm_notificationTriggers :: Lens' Alarm (Maybe [AlarmState])
- alarm_period :: Lens' Alarm (Maybe Natural)
- alarm_resourceType :: Lens' Alarm (Maybe ResourceType)
- alarm_state :: Lens' Alarm (Maybe AlarmState)
- alarm_statistic :: Lens' Alarm (Maybe MetricStatistic)
- alarm_supportCode :: Lens' Alarm (Maybe Text)
- alarm_threshold :: Lens' Alarm (Maybe Double)
- alarm_treatMissingData :: Lens' Alarm (Maybe TreatMissingData)
- alarm_unit :: Lens' Alarm (Maybe MetricUnit)
Documentation
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.
Alarm' | |
|
Instances
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:
Alarm
, alarm_arn
- The Amazon Resource Name (ARN) of the alarm.
$sel:comparisonOperator:Alarm'
, alarm_comparisonOperator
- The arithmetic operation used when comparing the specified statistic and
threshold.
$sel:contactProtocols:Alarm'
, alarm_contactProtocols
- The contact protocols for the alarm, such as Email
, SMS
(text
messaging), or both.
$sel:createdAt:Alarm'
, alarm_createdAt
- The timestamp when the alarm was created.
$sel:datapointsToAlarm:Alarm'
, alarm_datapointsToAlarm
- The number of data points that must not within the specified threshold
to trigger the alarm.
$sel:evaluationPeriods:Alarm'
, alarm_evaluationPeriods
- The number of periods over which data is compared to the specified
threshold.
$sel:location:Alarm'
, alarm_location
- An object that lists information about the location of the alarm.
$sel:metricName:Alarm'
, alarm_metricName
- The name 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
, alarm_name
- The name of the alarm.
$sel:notificationEnabled:Alarm'
, alarm_notificationEnabled
- Indicates whether the alarm is enabled.
$sel:notificationTriggers:Alarm'
, alarm_notificationTriggers
- The alarm states that trigger a notification.
$sel:period:Alarm'
, alarm_period
- The period, in seconds, over which the statistic is applied.
Alarm
, alarm_resourceType
- The Lightsail resource type (e.g., Alarm
).
$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: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: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:threshold:Alarm'
, alarm_threshold
- The value against which the specified statistic is compared.
$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:unit:Alarm'
, alarm_unit
- The unit 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_contactProtocols :: Lens' Alarm (Maybe [ContactProtocol]) Source #
The contact protocols for the alarm, such as Email
, SMS
(text
messaging), or both.
alarm_datapointsToAlarm :: Lens' Alarm (Maybe Int) Source #
The number of data points that must not within the specified threshold to trigger the alarm.
alarm_evaluationPeriods :: Lens' Alarm (Maybe Int) Source #
The number of periods over which data is compared to the specified threshold.
alarm_location :: Lens' Alarm (Maybe ResourceLocation) Source #
An object that lists information about the location of the alarm.
alarm_metricName :: Lens' Alarm (Maybe MetricName) Source #
The name 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.
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_period :: Lens' Alarm (Maybe Natural) Source #
The period, in seconds, over which the statistic is applied.
alarm_resourceType :: Lens' Alarm (Maybe ResourceType) Source #
The Lightsail resource type (e.g., 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_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_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_threshold :: Lens' Alarm (Maybe Double) Source #
The value against which the specified statistic is compared.
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_unit :: Lens' Alarm (Maybe MetricUnit) Source #
The unit of the metric associated with the alarm.