aws.cloudwatch.list_metrics
Example SQL Queries
SELECT * FROMaws.cloudwatch.list_metrics;Description
List the specified metrics. You can use the returned metrics with GetMetricData or GetMetricStatistics to get 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 for the metric to appear. To see metric statistics sooner, use GetMetricData or GetMetricStatistics.
If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view metrics from the linked source accounts. For more information, see CloudWatch cross-account observability.
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.
Table Definition
| Column Name | Column Data Type |
|---|---|
| dimensions Input Column The dimensions to filter against. Only the dimensions that match exactly will be returned. | STRUCT( |
Show child fields
| |
| include_linked_accounts Input Column If you are using this operation in a monitoring account, specify true to include metrics from source accounts in the returned data. The default is false. | BOOLEAN |
| metric_name Input Column The name of the metric to filter against. Only the metrics with names that match exactly will be returned. | VARCHAR |
| namespace Input Column The metric namespace to filter against. Only the namespace that matches exactly will be returned. | VARCHAR |
| owning_account Input Column When you use this operation in a monitoring account, use this field to return metrics only from one source account. To do so, specify that source account ID in this field, and also specify true for IncludeLinkedAccounts. | VARCHAR |
| recently_active Input Column To filter the results to show only metrics that have had data points published in the past three hours, specify this parameter with a value of PT3H. This is the only valid value for this parameter. The results that are returned are an approximation of the value you specify. There is a low probability that the returned results include metrics with last published data as much as 40 minutes more than the specified time interval. | VARCHAR |
| _aws_profile Input Column The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role. | STRUCT( |
Show child fields
| |
| metrics The metrics that match your request. | STRUCT( |
Show child fields
| |
| owning_accounts If you are using this operation in a monitoring account, this array contains the account IDs of the source accounts where the metrics in the returned data are from. This field is a 1:1 mapping between each metric that is returned and the ID of the owning account. | VARCHAR[] |
Show child fields
| |