Amazon CloudWatch
API Reference (API Version 2010-08-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

ListMetrics

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.

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 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.

Request Parameters

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

Dimensions.member.N

A list of dimensions to filter against.

Type: DimensionFilter list

Length constraints: Minimum of 0 item(s) in the list. Maximum of 10 item(s) in the list.

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.

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 in a ListMetricsResult structure.

Metrics

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

Type: Metric list

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.

InternalService

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