AWS CloudWatch · Schema
MetricDataQuery
This structure is used in both GetMetricData and PutMetricAlarm. The supported use of this structure is different for those two operations.
AlarmsDashboardsLogsMetricsMonitoringObservability
Properties
| Name | Type | Description |
|---|---|---|
| Id | string | A short name used to tie this object to the results in the response. |
| MetricStat | object | |
| Expression | string | This field can contain a Metrics Insights query, or a metric math expression. |
| Label | string | A human-readable label for this metric or expression. |
| ReturnData | boolean | When used in GetMetricData, this option indicates whether to return the timestamps and raw data values of this metric. |
| Period | integer | The granularity, in seconds, of the returned data points. |
| AccountId | string | The ID of the account where the metrics are located. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/MetricDataQuery",
"title": "MetricDataQuery",
"type": "object",
"description": "This structure is used in both GetMetricData and PutMetricAlarm. The supported use of this structure is different for those two operations.",
"required": [
"Id"
],
"properties": {
"Id": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"pattern": "[a-z][a-zA-Z0-9_]*",
"description": "A short name used to tie this object to the results in the response.",
"example": "abc123"
},
"MetricStat": {
"$ref": "#/components/schemas/MetricStat"
},
"Expression": {
"type": "string",
"minLength": 1,
"maxLength": 2048,
"description": "This field can contain a Metrics Insights query, or a metric math expression.",
"example": "example_value"
},
"Label": {
"type": "string",
"description": "A human-readable label for this metric or expression.",
"example": "Example Title"
},
"ReturnData": {
"type": "boolean",
"description": "When used in GetMetricData, this option indicates whether to return the timestamps and raw data values of this metric.",
"example": true
},
"Period": {
"type": "integer",
"minimum": 1,
"description": "The granularity, in seconds, of the returned data points.",
"example": 10
},
"AccountId": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The ID of the account where the metrics are located.",
"example": "500123"
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/cloudwatch-metricdataquery"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.