Copyright | (c) 2013-2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric. Optionally, this operation can associate one or more Amazon Simple Notification Service resources with the alarm.
When this operation creates an alarm, the alarm state is immediately set
to INSUFFICIENT_DATA
. The alarm is evaluated and its StateValue
is
set appropriately. Any actions associated with the StateValue
is then
executed.
See: AWS API Reference for PutMetricAlarm.
- putMetricAlarm :: Text -> Text -> Text -> Statistic -> Natural -> Natural -> Double -> ComparisonOperator -> PutMetricAlarm
- data PutMetricAlarm
- pmaAlarmDescription :: Lens' PutMetricAlarm (Maybe Text)
- pmaOKActions :: Lens' PutMetricAlarm [Text]
- pmaActionsEnabled :: Lens' PutMetricAlarm (Maybe Bool)
- pmaInsufficientDataActions :: Lens' PutMetricAlarm [Text]
- pmaDimensions :: Lens' PutMetricAlarm [Dimension]
- pmaAlarmActions :: Lens' PutMetricAlarm [Text]
- pmaUnit :: Lens' PutMetricAlarm (Maybe StandardUnit)
- pmaAlarmName :: Lens' PutMetricAlarm Text
- pmaMetricName :: Lens' PutMetricAlarm Text
- pmaNamespace :: Lens' PutMetricAlarm Text
- pmaStatistic :: Lens' PutMetricAlarm Statistic
- pmaPeriod :: Lens' PutMetricAlarm Natural
- pmaEvaluationPeriods :: Lens' PutMetricAlarm Natural
- pmaThreshold :: Lens' PutMetricAlarm Double
- pmaComparisonOperator :: Lens' PutMetricAlarm ComparisonOperator
- putMetricAlarmResponse :: PutMetricAlarmResponse
- data PutMetricAlarmResponse
Creating a Request
:: Text | |
-> Text | |
-> Text | |
-> Statistic | |
-> Natural | |
-> Natural | |
-> Double | |
-> ComparisonOperator | |
-> PutMetricAlarm |
Creates a value of PutMetricAlarm
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data PutMetricAlarm Source
See: putMetricAlarm
smart constructor.
Request Lenses
pmaAlarmDescription :: Lens' PutMetricAlarm (Maybe Text) Source
The description for the alarm.
pmaOKActions :: Lens' PutMetricAlarm [Text] Source
The list of actions to execute when this alarm transitions into an OK
state from any other state. Each action is specified as an Amazon
Resource Number (ARN). Currently the only action supported is publishing
to an Amazon SNS topic or an Amazon Auto Scaling policy.
pmaActionsEnabled :: Lens' PutMetricAlarm (Maybe Bool) Source
Indicates whether or not actions should be executed during any changes to the alarm's state.
pmaInsufficientDataActions :: Lens' PutMetricAlarm [Text] Source
The list of actions to execute when this alarm transitions into an
INSUFFICIENT_DATA
state from any other state. Each action is specified
as an Amazon Resource Number (ARN). Currently the only action supported
is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.
pmaDimensions :: Lens' PutMetricAlarm [Dimension] Source
The dimensions for the alarm's associated metric.
pmaAlarmActions :: Lens' PutMetricAlarm [Text] Source
The list of actions to execute when this alarm transitions into an
ALARM
state from any other state. Each action is specified as an
Amazon Resource Number (ARN). Currently the only action supported is
publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.
pmaUnit :: Lens' PutMetricAlarm (Maybe StandardUnit) Source
The unit for the alarm's associated metric.
pmaAlarmName :: Lens' PutMetricAlarm Text Source
The descriptive name for the alarm. This name must be unique within the user's AWS account
pmaMetricName :: Lens' PutMetricAlarm Text Source
The name for the alarm's associated metric.
pmaNamespace :: Lens' PutMetricAlarm Text Source
The namespace for the alarm's associated metric.
pmaStatistic :: Lens' PutMetricAlarm Statistic Source
The statistic to apply to the alarm's associated metric.
pmaPeriod :: Lens' PutMetricAlarm Natural Source
The period in seconds over which the specified statistic is applied.
pmaEvaluationPeriods :: Lens' PutMetricAlarm Natural Source
The number of periods over which data is compared to the specified threshold.
pmaThreshold :: Lens' PutMetricAlarm Double Source
The value against which the specified statistic is compared.
Destructuring the Response
putMetricAlarmResponse :: PutMetricAlarmResponse Source
Creates a value of PutMetricAlarmResponse
with the minimum fields required to make a request.