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 |
This is the Amazon CloudWatch API Reference. This guide provides detailed information about Amazon CloudWatch actions, data types, parameters, and errors. For detailed information about Amazon CloudWatch features and their associated API calls, go to the Amazon CloudWatch Developer Guide.
Amazon CloudWatch is a web service that enables you to publish, monitor, and manage various metrics, as well as configure alarm actions based on data from metrics. For more information about this product go to http://aws.amazon.com/cloudwatch.
For information about the namespace, metric names, and dimensions that other Amazon Web Services products use to send metrics to Cloudwatch, go to Amazon CloudWatch Metrics, Namespaces, and Dimensions Reference in the Amazon CloudWatch Developer Guide.
Use the following links to get started using the /Amazon CloudWatch API Reference/:
- Actions: An alphabetical list of all Amazon CloudWatch actions.
- Data Types: An alphabetical list of all Amazon CloudWatch data types.
- Common Parameters: Parameters that all Query actions can use.
- Common Errors: Client and server errors that all actions can return.
- Regions and Endpoints: Itemized regions and endpoints for all AWS products.
- WSDL Location: http://monitoring.amazonaws.com/doc/2010-08-01/CloudWatch.wsdl
In addition to using the Amazon CloudWatch API, you can also use the following SDKs and third-party libraries to access Amazon CloudWatch programmatically.
- AWS SDK for Java Documentation
- AWS SDK for .NET Documentation
- AWS SDK for PHP Documentation
- AWS SDK for Ruby Documentation
Developers in the AWS developer community also provide their own libraries, which you can find at the following AWS developer centers:
- AWS Java Developer Center
- AWS PHP Developer Center
- AWS Python Developer Center
- AWS Ruby Developer Center
- AWS Windows and .NET Developer Center
See: AWS API Reference
- cloudWatch :: Service
- _LimitExceededFault :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidNextToken :: AsError a => Getting (First ServiceError) a ServiceError
- _InternalServiceFault :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidFormatFault :: AsError a => Getting (First ServiceError) a ServiceError
- _MissingRequiredParameterException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidParameterCombinationException :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceNotFound :: AsError a => Getting (First ServiceError) a ServiceError
- module Network.AWS.CloudWatch.EnableAlarmActions
- module Network.AWS.CloudWatch.PutMetricData
- module Network.AWS.CloudWatch.DescribeAlarms
- module Network.AWS.CloudWatch.ListMetrics
- module Network.AWS.CloudWatch.DeleteAlarms
- module Network.AWS.CloudWatch.DescribeAlarmHistory
- module Network.AWS.CloudWatch.GetMetricStatistics
- module Network.AWS.CloudWatch.DescribeAlarmsForMetric
- module Network.AWS.CloudWatch.DisableAlarmActions
- module Network.AWS.CloudWatch.PutMetricAlarm
- module Network.AWS.CloudWatch.SetAlarmState
- data ComparisonOperator
- data HistoryItemType
- data StandardUnit
- = Bits
- | BitsSecond
- | Bytes
- | BytesSecond
- | Count
- | CountSecond
- | Gigabits
- | GigabitsSecond
- | Gigabytes
- | GigabytesSecond
- | Kilobits
- | KilobitsSecond
- | Kilobytes
- | KilobytesSecond
- | Megabits
- | MegabitsSecond
- | Megabytes
- | MegabytesSecond
- | Microseconds
- | Milliseconds
- | None
- | Percent
- | Seconds
- | Terabits
- | TerabitsSecond
- | Terabytes
- | TerabytesSecond
- data StateValue
- = Alarm
- | InsufficientData
- | OK
- data Statistic
- = Average
- | Maximum
- | Minimum
- | SampleCount
- | Sum
- data AlarmHistoryItem
- alarmHistoryItem :: AlarmHistoryItem
- ahiAlarmName :: Lens' AlarmHistoryItem (Maybe Text)
- ahiHistoryItemType :: Lens' AlarmHistoryItem (Maybe HistoryItemType)
- ahiHistoryData :: Lens' AlarmHistoryItem (Maybe Text)
- ahiHistorySummary :: Lens' AlarmHistoryItem (Maybe Text)
- ahiTimestamp :: Lens' AlarmHistoryItem (Maybe UTCTime)
- data Datapoint
- datapoint :: Datapoint
- dSampleCount :: Lens' Datapoint (Maybe Double)
- dMaximum :: Lens' Datapoint (Maybe Double)
- dAverage :: Lens' Datapoint (Maybe Double)
- dMinimum :: Lens' Datapoint (Maybe Double)
- dSum :: Lens' Datapoint (Maybe Double)
- dUnit :: Lens' Datapoint (Maybe StandardUnit)
- dTimestamp :: Lens' Datapoint (Maybe UTCTime)
- data Dimension
- dimension :: Text -> Text -> Dimension
- dName :: Lens' Dimension Text
- dValue :: Lens' Dimension Text
- data DimensionFilter
- dimensionFilter :: Text -> DimensionFilter
- dfValue :: Lens' DimensionFilter (Maybe Text)
- dfName :: Lens' DimensionFilter Text
- data Metric
- metric :: Metric
- mMetricName :: Lens' Metric (Maybe Text)
- mNamespace :: Lens' Metric (Maybe Text)
- mDimensions :: Lens' Metric [Dimension]
- data MetricAlarm
- metricAlarm :: MetricAlarm
- maAlarmName :: Lens' MetricAlarm (Maybe Text)
- maStateUpdatedTimestamp :: Lens' MetricAlarm (Maybe UTCTime)
- maPeriod :: Lens' MetricAlarm (Maybe Natural)
- maAlarmDescription :: Lens' MetricAlarm (Maybe Text)
- maEvaluationPeriods :: Lens' MetricAlarm (Maybe Natural)
- maMetricName :: Lens' MetricAlarm (Maybe Text)
- maNamespace :: Lens' MetricAlarm (Maybe Text)
- maComparisonOperator :: Lens' MetricAlarm (Maybe ComparisonOperator)
- maOKActions :: Lens' MetricAlarm [Text]
- maStateValue :: Lens' MetricAlarm (Maybe StateValue)
- maThreshold :: Lens' MetricAlarm (Maybe Double)
- maAlarmConfigurationUpdatedTimestamp :: Lens' MetricAlarm (Maybe UTCTime)
- maActionsEnabled :: Lens' MetricAlarm (Maybe Bool)
- maInsufficientDataActions :: Lens' MetricAlarm [Text]
- maStateReason :: Lens' MetricAlarm (Maybe Text)
- maStateReasonData :: Lens' MetricAlarm (Maybe Text)
- maDimensions :: Lens' MetricAlarm [Dimension]
- maAlarmARN :: Lens' MetricAlarm (Maybe Text)
- maAlarmActions :: Lens' MetricAlarm [Text]
- maUnit :: Lens' MetricAlarm (Maybe StandardUnit)
- maStatistic :: Lens' MetricAlarm (Maybe Statistic)
- data MetricDatum
- metricDatum :: Text -> MetricDatum
- mdValue :: Lens' MetricDatum (Maybe Double)
- mdDimensions :: Lens' MetricDatum [Dimension]
- mdUnit :: Lens' MetricDatum (Maybe StandardUnit)
- mdTimestamp :: Lens' MetricDatum (Maybe UTCTime)
- mdStatisticValues :: Lens' MetricDatum (Maybe StatisticSet)
- mdMetricName :: Lens' MetricDatum Text
- data StatisticSet
- statisticSet :: Double -> Double -> Double -> Double -> StatisticSet
- ssSampleCount :: Lens' StatisticSet Double
- ssSum :: Lens' StatisticSet Double
- ssMinimum :: Lens' StatisticSet Double
- ssMaximum :: Lens' StatisticSet Double
Service Configuration
API version '2010-08-01' of the Amazon CloudWatch SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by CloudWatch
.
LimitExceededFault
_LimitExceededFault :: AsError a => Getting (First ServiceError) a ServiceError Source
The quota for alarms for this customer has already been reached.
InvalidNextToken
_InvalidNextToken :: AsError a => Getting (First ServiceError) a ServiceError Source
The next token specified is invalid.
InternalServiceFault
_InternalServiceFault :: AsError a => Getting (First ServiceError) a ServiceError Source
Indicates that the request processing has failed due to some unknown error, exception, or failure.
InvalidParameterValueException
_InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError Source
Bad or out-of-range value was supplied for the input parameter.
InvalidFormatFault
_InvalidFormatFault :: AsError a => Getting (First ServiceError) a ServiceError Source
Data was not syntactically valid JSON.
MissingRequiredParameterException
_MissingRequiredParameterException :: AsError a => Getting (First ServiceError) a ServiceError Source
An input parameter that is mandatory for processing the request is not supplied.
InvalidParameterCombinationException
_InvalidParameterCombinationException :: AsError a => Getting (First ServiceError) a ServiceError Source
Parameters that must not be used together were used together.
ResourceNotFound
_ResourceNotFound :: AsError a => Getting (First ServiceError) a ServiceError Source
The named resource does not exist.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
EnableAlarmActions
PutMetricData
DescribeAlarms (Paginated)
ListMetrics (Paginated)
DeleteAlarms
DescribeAlarmHistory (Paginated)
GetMetricStatistics
DescribeAlarmsForMetric
DisableAlarmActions
PutMetricAlarm
SetAlarmState
Types
ComparisonOperator
data ComparisonOperator Source
HistoryItemType
data HistoryItemType Source
StandardUnit
data StandardUnit Source
StateValue
data StateValue Source
Statistic
AlarmHistoryItem
data AlarmHistoryItem Source
The AlarmHistoryItem
data type contains descriptive information about
the history of a specific alarm. If you call DescribeAlarmHistory,
Amazon CloudWatch returns this data type as part of the
DescribeAlarmHistoryResult data type.
See: alarmHistoryItem
smart constructor.
alarmHistoryItem :: AlarmHistoryItem Source
Creates a value of AlarmHistoryItem
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ahiAlarmName :: Lens' AlarmHistoryItem (Maybe Text) Source
The descriptive name for the alarm.
ahiHistoryItemType :: Lens' AlarmHistoryItem (Maybe HistoryItemType) Source
The type of alarm history item.
ahiHistoryData :: Lens' AlarmHistoryItem (Maybe Text) Source
Machine-readable data about the alarm in JSON format.
ahiHistorySummary :: Lens' AlarmHistoryItem (Maybe Text) Source
A human-readable summary of the alarm history.
ahiTimestamp :: Lens' AlarmHistoryItem (Maybe UTCTime) Source
The time stamp for the alarm history item. Amazon CloudWatch uses Coordinated Universal Time (UTC) when returning time stamps, which do not accommodate seasonal adjustments such as daylight savings time. For more information, see Time stamps in the Amazon CloudWatch Developer Guide.
Datapoint
Creates a value of Datapoint
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dSampleCount :: Lens' Datapoint (Maybe Double) Source
The number of metric values that contributed to the aggregate value of this datapoint.
dMaximum :: Lens' Datapoint (Maybe Double) Source
The maximum of the metric value used for the datapoint.
dAverage :: Lens' Datapoint (Maybe Double) Source
The average of metric values that correspond to the datapoint.
dTimestamp :: Lens' Datapoint (Maybe UTCTime) Source
The time stamp used for the datapoint. Amazon CloudWatch uses Coordinated Universal Time (UTC) when returning time stamps, which do not accommodate seasonal adjustments such as daylight savings time. For more information, see Time stamps in the Amazon CloudWatch Developer Guide.
Dimension
DimensionFilter
data DimensionFilter Source
The DimensionFilter
data type is used to filter ListMetrics results.
See: dimensionFilter
smart constructor.
Creates a value of DimensionFilter
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dfName :: Lens' DimensionFilter Text Source
The dimension name to be matched.
Metric
The Metric
data type contains information about a specific metric. If
you call ListMetrics, Amazon CloudWatch returns information contained by
this data type.
The example in the Examples section publishes two metrics named buffers and latency. Both metrics are in the examples namespace. Both metrics have two dimensions, InstanceID and InstanceType.
See: metric
smart constructor.
Creates a value of Metric
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mDimensions :: Lens' Metric [Dimension] Source
A list of dimensions associated with the metric.
MetricAlarm
data MetricAlarm Source
The MetricAlarm data type represents an alarm. You can use PutMetricAlarm to create or update an alarm.
See: metricAlarm
smart constructor.
metricAlarm :: MetricAlarm Source
Creates a value of MetricAlarm
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
maAlarmName
maStateUpdatedTimestamp
maPeriod
maAlarmDescription
maEvaluationPeriods
maMetricName
maNamespace
maComparisonOperator
maOKActions
maStateValue
maThreshold
maAlarmConfigurationUpdatedTimestamp
maActionsEnabled
maInsufficientDataActions
maStateReason
maStateReasonData
maDimensions
maAlarmARN
maAlarmActions
maUnit
maStatistic
maAlarmName :: Lens' MetricAlarm (Maybe Text) Source
The name of the alarm.
maStateUpdatedTimestamp :: Lens' MetricAlarm (Maybe UTCTime) Source
The time stamp of the last update to the alarm's state. Amazon CloudWatch uses Coordinated Universal Time (UTC) when returning time stamps, which do not accommodate seasonal adjustments such as daylight savings time. For more information, see Time stamps in the Amazon CloudWatch Developer Guide.
maPeriod :: Lens' MetricAlarm (Maybe Natural) Source
The period in seconds over which the statistic is applied.
maAlarmDescription :: Lens' MetricAlarm (Maybe Text) Source
The description for the alarm.
maEvaluationPeriods :: Lens' MetricAlarm (Maybe Natural) Source
The number of periods over which data is compared to the specified threshold.
maMetricName :: Lens' MetricAlarm (Maybe Text) Source
The name of the alarm's metric.
maNamespace :: Lens' MetricAlarm (Maybe Text) Source
The namespace of alarm's associated metric.
maOKActions :: Lens' MetricAlarm [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 actions supported are
publishing to an Amazon SNS topic and triggering an Auto Scaling policy.
maStateValue :: Lens' MetricAlarm (Maybe StateValue) Source
The state value for the alarm.
maThreshold :: Lens' MetricAlarm (Maybe Double) Source
The value against which the specified statistic is compared.
maAlarmConfigurationUpdatedTimestamp :: Lens' MetricAlarm (Maybe UTCTime) Source
The time stamp of the last update to the alarm configuration. Amazon CloudWatch uses Coordinated Universal Time (UTC) when returning time stamps, which do not accommodate seasonal adjustments such as daylight savings time. For more information, see Time stamps in the Amazon CloudWatch Developer Guide.
maActionsEnabled :: Lens' MetricAlarm (Maybe Bool) Source
Indicates whether actions should be executed during any changes to the alarm's state.
maInsufficientDataActions :: Lens' MetricAlarm [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 actions supported
are publishing to an Amazon SNS topic or triggering an Auto Scaling
policy.
The current WSDL lists this attribute as UnknownActions
.
maStateReason :: Lens' MetricAlarm (Maybe Text) Source
A human-readable explanation for the alarm's state.
maStateReasonData :: Lens' MetricAlarm (Maybe Text) Source
An explanation for the alarm's state in machine-readable JSON format
maDimensions :: Lens' MetricAlarm [Dimension] Source
The list of dimensions associated with the alarm's associated metric.
maAlarmARN :: Lens' MetricAlarm (Maybe Text) Source
The Amazon Resource Name (ARN) of the alarm.
maAlarmActions :: Lens' MetricAlarm [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 actions supported are
publishing to an Amazon SNS topic and triggering an Auto Scaling policy.
maUnit :: Lens' MetricAlarm (Maybe StandardUnit) Source
The unit of the alarm's associated metric.
maStatistic :: Lens' MetricAlarm (Maybe Statistic) Source
The statistic to apply to the alarm's associated metric.
MetricDatum
data MetricDatum Source
The MetricDatum
data type encapsulates the information sent with
PutMetricData to either create a new metric or add new values to be
aggregated into an existing metric.
See: metricDatum
smart constructor.
Creates a value of MetricDatum
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mdValue :: Lens' MetricDatum (Maybe Double) Source
The value for the metric.
Although the Value
parameter accepts numbers of type Double
, Amazon
CloudWatch truncates values with very large exponents. Values with
base-10 exponents greater than 126 (1 x 10^126) are truncated. Likewise,
values with base-10 exponents less than -130 (1 x 10^-130) are also
truncated.
mdDimensions :: Lens' MetricDatum [Dimension] Source
A list of dimensions associated with the metric. Note, when using the Dimensions value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
mdUnit :: Lens' MetricDatum (Maybe StandardUnit) Source
The unit of the metric.
mdTimestamp :: Lens' MetricDatum (Maybe UTCTime) Source
The time stamp used for the metric. If not specified, the default value is set to the time the metric data was received. Amazon CloudWatch uses Coordinated Universal Time (UTC) when returning time stamps, which do not accommodate seasonal adjustments such as daylight savings time. For more information, see Time stamps in the Amazon CloudWatch Developer Guide.
mdStatisticValues :: Lens' MetricDatum (Maybe StatisticSet) Source
A set of statistical values describing the metric.
mdMetricName :: Lens' MetricDatum Text Source
The name of the metric.
StatisticSet
data StatisticSet Source
The StatisticSet
data type describes the StatisticValues
component
of MetricDatum, and represents a set of statistics that describes a
specific metric.
See: statisticSet
smart constructor.
Creates a value of StatisticSet
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ssSampleCount :: Lens' StatisticSet Double Source
The number of samples used for the statistic set.
ssSum :: Lens' StatisticSet Double Source
The sum of values for the sample set.
ssMinimum :: Lens' StatisticSet Double Source
The minimum value of the sample set.
ssMaximum :: Lens' StatisticSet Double Source
The maximum value of the sample set.