Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ListMetricsCommand

List the specified metrics. You can use the returned metrics with GetMetricData or GetMetricStatistics to obtain statistical data.

Up to 500 results are returned for any one call. To retrieve additional results, use the returned token with subsequent calls.

After you create a metric, allow up to 15 minutes before the metric appears. You can see statistics about the metric sooner by using GetMetricData or GetMetricStatistics.

ListMetrics doesn't return information about metrics if those metrics haven't reported data in the past two weeks. To retrieve those metrics, use GetMetricData or GetMetricStatistics.

example

Use a bare-bones client and the command you need to make an API call.

import { CloudWatchClient, ListMetricsCommand } from "@aws-sdk/client-cloudwatch"; // ES Modules import
// const { CloudWatchClient, ListMetricsCommand } = require("@aws-sdk/client-cloudwatch"); // CommonJS import
const client = new CloudWatchClient(config);
const command = new ListMetricsCommand(input);
const response = await client.send(command);
see

ListMetricsCommandInput for command's input shape.

see

ListMetricsCommandOutput for command's response shape.

see

config for command's input shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

  • Parameters

    Returns ListMetricsCommand

  • Parameters

    • input: ListMetricsCommandInput

    Returns ListMetricsCommand

Properties

Readonly input

input: ListMetricsCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<ListMetricsCommandInput, ListMetricsCommandOutput>