amazonka-cloudwatch-1.4.0: Amazon CloudWatch SDK.

Copyright(c) 2013-2016 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.ListMetrics

Contents

Description

Returns a list of valid metrics stored for the AWS account owner. Returned metrics can be used with GetMetricStatistics to obtain statistical data for a given metric.

Up to 500 results are returned for any one call. To retrieve further results, use returned NextToken values with subsequent ListMetrics operations.

If you create a metric with the PutMetricData action, allow up to fifteen minutes for the metric to appear in calls to the ListMetrics action. Statistics about the metric, however, are available sooner using GetMetricStatistics.

This operation returns paginated results.

Synopsis

Creating a Request

listMetrics :: ListMetrics Source

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

Use one of the following lenses to modify other fields as desired:

Request Lenses

lmMetricName :: Lens' ListMetrics (Maybe Text) Source

The name of the metric to filter against.

lmNamespace :: Lens' ListMetrics (Maybe Text) Source

The namespace to filter against.

lmNextToken :: Lens' ListMetrics (Maybe Text) Source

The token returned by a previous call to indicate that there is more data available.

lmDimensions :: Lens' ListMetrics [DimensionFilter] Source

A list of dimensions to filter against.

Destructuring the Response

listMetricsResponse Source

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

Use one of the following lenses to modify other fields as desired:

Response Lenses

lmrsMetrics :: Lens' ListMetricsResponse [Metric] Source

A list of metrics used to generate statistics for an AWS account.

lmrsNextToken :: Lens' ListMetricsResponse (Maybe Text) Source

A string that marks the start of the next batch of returned results.