{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-describe-query-response-schema.json",
  "title": "DescribeQueryResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-queries-api-openapi.yml#/components/schemas/DescribeQueryResponse",
  "type": "object",
  "properties": {
    "queryId": {
      "type": "string",
      "description": "The unique identifier for the query execution."
    },
    "status": {
      "type": "string",
      "enum": [
        "SUBMITTED",
        "RUNNING",
        "COMPLETED",
        "FAILED",
        "CANCELED",
        "CANCELING"
      ],
      "description": "The current query status."
    },
    "submittedAt": {
      "type": "string",
      "description": "The date and time when the query was submitted, in Unix epoch time."
    },
    "completedAt": {
      "type": "string",
      "description": "The date and time when the query reached a terminal state, in Unix epoch time. This field is present when the query status is COMPLETED, FAILED, or CANCELED."
    },
    "statistics": {
      "$ref": "#/$defs/QueryStatistics"
    },
    "errorMessage": {
      "type": "string",
      "description": "A human-readable error description. This field is present when the query status is FAILED."
    }
  },
  "required": [
    "queryId",
    "status",
    "submittedAt"
  ],
  "$defs": {
    "QueryStatistics": {
      "type": "object",
      "properties": {
        "rowCount": {
          "type": "integer",
          "description": "The total number of rows returned by the query."
        },
        "bytesScanned": {
          "type": "integer",
          "description": "The total number of bytes scanned during query execution."
        },
        "executionTimeInMillis": {
          "type": "integer",
          "description": "The total query execution time, in milliseconds."
        }
      },
      "required": [
        "rowCount",
        "bytesScanned",
        "executionTimeInMillis"
      ]
    }
  }
}