{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-core/json-schema/amazon-iot-core-get-buckets-aggregation-request-schema.json",
  "title": "GetBucketsAggregationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-core-indices-api-openapi.yml#/components/schemas/GetBucketsAggregationRequest",
  "type": "object",
  "properties": {
    "indexName": {
      "type": "string",
      "description": "The name of the index to search."
    },
    "queryString": {
      "type": "string",
      "description": "The search query string."
    },
    "aggregationField": {
      "type": "string",
      "description": "The aggregation field."
    },
    "queryVersion": {
      "type": "string",
      "description": "The version of the query."
    },
    "bucketsAggregationType": {
      "$ref": "#/$defs/BucketsAggregationType"
    }
  },
  "required": [
    "queryString",
    "aggregationField",
    "bucketsAggregationType"
  ],
  "$defs": {
    "BucketsAggregationType": {
      "type": "object",
      "properties": {
        "termsAggregation": {
          "$ref": "#/$defs/TermsAggregation"
        }
      }
    },
    "TermsAggregation": {
      "type": "object",
      "properties": {
        "maxBuckets": {
          "type": "integer",
          "description": "The number of buckets to return in the response. Default to 10."
        }
      }
    }
  }
}