{
  "$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"
    }
  }
}