{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-device-defender/json-schema/amazon-iot-device-defender-describe-fleet-metric-response-schema.json",
  "title": "DescribeFleetMetricResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-device-defender-fleet-metric-api-openapi.yml#/components/schemas/DescribeFleetMetricResponse",
  "type": "object",
  "properties": {
    "metricName": {
      "allOf": [
        {
          "$ref": "#/$defs/FleetMetricName"
        },
        {
          "description": "The name of the fleet metric to describe."
        }
      ]
    },
    "queryString": {
      "allOf": [
        {
          "$ref": "#/$defs/QueryString"
        },
        {
          "description": "The search query string."
        }
      ]
    },
    "aggregationType": {
      "allOf": [
        {
          "$ref": "#/$defs/AggregationType"
        },
        {
          "description": "The type of the aggregation query."
        }
      ]
    },
    "period": {
      "allOf": [
        {
          "$ref": "#/$defs/FleetMetricPeriod"
        },
        {
          "description": "The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60."
        }
      ]
    },
    "aggregationField": {
      "allOf": [
        {
          "$ref": "#/$defs/AggregationField"
        },
        {
          "description": "The field to aggregate."
        }
      ]
    },
    "description": {
      "allOf": [
        {
          "$ref": "#/$defs/FleetMetricDescription"
        },
        {
          "description": "The fleet metric description."
        }
      ]
    },
    "queryVersion": {
      "allOf": [
        {
          "$ref": "#/$defs/QueryVersion"
        },
        {
          "description": "The query version."
        }
      ]
    },
    "indexName": {
      "allOf": [
        {
          "$ref": "#/$defs/IndexName"
        },
        {
          "description": "The name of the index to search."
        }
      ]
    },
    "creationDate": {
      "allOf": [
        {
          "$ref": "#/$defs/CreationDate"
        },
        {
          "description": "The date when the fleet metric is created."
        }
      ]
    },
    "lastModifiedDate": {
      "allOf": [
        {
          "$ref": "#/$defs/LastModifiedDate"
        },
        {
          "description": "The date when the fleet metric is last modified."
        }
      ]
    },
    "unit": {
      "allOf": [
        {
          "$ref": "#/$defs/FleetMetricUnit"
        },
        {
          "description": "Used to support unit transformation such as milliseconds to seconds. The unit must be supported by <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html\">CW metric</a>."
        }
      ]
    },
    "version": {
      "allOf": [
        {
          "$ref": "#/$defs/Version"
        },
        {
          "description": "The version of the fleet metric."
        }
      ]
    },
    "metricArn": {
      "allOf": [
        {
          "$ref": "#/$defs/FleetMetricArn"
        },
        {
          "description": "The ARN of the fleet metric to describe."
        }
      ]
    }
  },
  "$defs": {
    "AggregationField": {
      "type": "string",
      "minLength": 1
    },
    "AggregationType": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "allOf": [
            {
              "$ref": "#/$defs/AggregationTypeName"
            },
            {
              "description": "The name of the aggregation type."
            }
          ]
        },
        "values": {
          "allOf": [
            {
              "$ref": "#/$defs/AggregationTypeValues"
            },
            {
              "description": "A list of the values of aggregation types."
            }
          ]
        }
      },
      "description": "The type of aggregation queries."
    },
    "AggregationTypeName": {
      "type": "string",
      "enum": [
        "Statistics",
        "Percentiles",
        "Cardinality"
      ]
    },
    "AggregationTypeValue": {
      "type": "string",
      "pattern": "[a-zA-Z0-9]+",
      "minLength": 1,
      "maxLength": 12
    },
    "AggregationTypeValues": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregationTypeValue"
      }
    },
    "CreationDate": {
      "type": "string",
      "format": "date-time"
    },
    "FleetMetricArn": {
      "type": "string"
    },
    "FleetMetricDescription": {
      "type": "string",
      "pattern": "[\\p{Graph}\\x20]*",
      "maxLength": 1024
    },
    "FleetMetricName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9_\\-\\.]+",
      "minLength": 1,
      "maxLength": 128
    },
    "FleetMetricPeriod": {
      "type": "integer",
      "minimum": 60,
      "maximum": 86400
    },
    "FleetMetricUnit": {
      "type": "string",
      "enum": [
        "Seconds",
        "Microseconds",
        "Milliseconds",
        "Bytes",
        "Kilobytes",
        "Megabytes",
        "Gigabytes",
        "Terabytes",
        "Bits",
        "Kilobits",
        "Megabits",
        "Gigabits",
        "Terabits",
        "Percent",
        "Count",
        "Bytes/Second",
        "Kilobytes/Second",
        "Megabytes/Second",
        "Gigabytes/Second",
        "Terabytes/Second",
        "Bits/Second",
        "Kilobits/Second",
        "Megabits/Second",
        "Gigabits/Second",
        "Terabits/Second",
        "Count/Second",
        "None"
      ]
    },
    "IndexName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9:_-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "LastModifiedDate": {
      "type": "string",
      "format": "date-time"
    },
    "QueryString": {
      "type": "string",
      "minLength": 1
    },
    "QueryVersion": {
      "type": "string"
    },
    "Version": {
      "type": "integer"
    }
  }
}