Menu
Amazon CloudWatch
API Reference (API Version 2010-08-01)

ListMetrics

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.

Note

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

Note

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

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

Dimensions.member.N

A list of dimensions to filter against.

Type: array of DimensionFilter objects

Array Members: Maximum number of 10 items.

Required: No

MetricName

The name of the metric to filter against.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No

Namespace

The namespace to filter against.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [^:].*

Required: No

NextToken

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

Type: String

Required: No

Response Elements

The following elements are returned by the service.

Metrics.member.N

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

Type: array of Metric objects

NextToken

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

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceError

Indicates that the request processing has failed due to some unknown error, exception, or failure.

HTTP Status Code: 500

InvalidParameterValue

Bad or out-of-range value was supplied for the input parameter.

HTTP Status Code: 400