{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-timestream/json-schema/amazon-timestream-query-request-schema.json",
  "title": "QueryRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-timestream-query-api-openapi.yml#/components/schemas/QueryRequest",
  "type": "object",
  "properties": {
    "QueryString": {
      "type": "string",
      "description": "The query to be run by Timestream."
    },
    "ClientToken": {
      "type": "string",
      "description": "Unique, case-sensitive string of up to 64 ASCII characters specified when a Query request is made. Providing a ClientToken makes the call to Query idempotent. This means that running the same query repeatedly will produce the same result. In other words, making multiple identical Query requests has the same effect as making a single request. When using ClientToken in a query, note the following: If the Query API is instantiated without a ClientToken, the Query SDK generates a ClientToken on your behalf. If the Query invocation only contains the ClientToken but does not include a NextToken, tha"
    },
    "NextToken": {
      "type": "string",
      "description": "A pagination token used to return a set of results. When the Query API is invoked using NextToken, that particular invocation is assumed to be a subsequent invocation of a prior call to Query, and a result set is returned. However, if the Query invocation only contains the ClientToken, that invocation of Query is assumed to be a new query run. Note the following when using NextToken in a query: A pagination token can be used for up to five Query invocations, OR for a duration of up to 1 hour – whichever comes first. Using the same NextToken will return the same set of records. To keep paginati"
    },
    "MaxRows": {
      "type": "integer",
      "description": "The total number of rows to be returned in the Query output. The initial run of Query with a MaxRows value specified will return the result set of the query in two cases: The size of the result is less than 1MB. The number of rows in the result set is less than the value of maxRows. Otherwise, the initial invocation of Query only returns a NextToken, which can then be used in subsequent calls to fetch the result set. To resume pagination, provide the NextToken value in the subsequent command. If the row size is large (e.g. a row has many columns), Timestream may return fewer rows to keep the r"
    },
    "QueryInsights": {
      "$ref": "#/$defs/QueryInsights"
    }
  },
  "required": [
    "QueryString"
  ],
  "$defs": {
    "QueryInsights": {
      "type": "object",
      "properties": {
        "Mode": {
          "type": "string",
          "enum": [
            "ENABLED_WITH_RATE_CONTROL",
            "DISABLED"
          ],
          "description": "Provides the following modes to enable QueryInsights: ENABLED_WITH_RATE_CONTROL – Enables QueryInsights for the queries being processed. This mode also includes a rate control mechanism, which limits the QueryInsights feature to 1 query per second (QPS). DISABLED – Disables QueryInsights."
        }
      },
      "required": [
        "Mode"
      ]
    }
  }
}