amazonka-cloudwatch-1.3.4: Amazon CloudWatch SDK.

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

Network.AWS.CloudWatch.PutMetricAlarm

Contents

Description

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.

Synopsis

Creating a Request

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.

pmaComparisonOperator :: Lens' PutMetricAlarm ComparisonOperator Source

The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

Destructuring the Response

putMetricAlarmResponse :: PutMetricAlarmResponse Source

Creates a value of PutMetricAlarmResponse with the minimum fields required to make a request.