{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-device-management/json-schema/amazon-iot-device-management-search-index-response-schema.json",
  "title": "SearchIndexResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-device-management-indices-api-openapi.yml#/components/schemas/SearchIndexResponse",
  "type": "object",
  "properties": {
    "nextToken": {
      "allOf": [
        {
          "$ref": "#/$defs/NextToken"
        },
        {
          "description": "The token used to get the next set of results, or <code>null</code> if there are no additional results."
        }
      ]
    },
    "things": {
      "allOf": [
        {
          "$ref": "#/$defs/ThingDocumentList"
        },
        {
          "description": "The things that match the search query."
        }
      ]
    },
    "thingGroups": {
      "allOf": [
        {
          "$ref": "#/$defs/ThingGroupDocumentList"
        },
        {
          "description": "The thing groups that match the search query."
        }
      ]
    }
  },
  "$defs": {
    "AttributeValue": {
      "type": "string",
      "pattern": "[a-zA-Z0-9_.,@/:#-]*",
      "maxLength": 800
    },
    "Attributes": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/AttributeValue"
      }
    },
    "Boolean": {
      "type": "boolean"
    },
    "ConnectivityTimestamp": {
      "type": "integer"
    },
    "DisconnectReason": {
      "type": "string"
    },
    "JsonDocument": {
      "type": "string"
    },
    "NextToken": {
      "type": "string"
    },
    "ThingConnectivity": {
      "type": "object",
      "properties": {
        "connected": {
          "allOf": [
            {
              "$ref": "#/$defs/Boolean"
            },
            {
              "description": "True if the thing is connected to the Amazon Web Services IoT Core service; false if it is not connected."
            }
          ]
        },
        "timestamp": {
          "allOf": [
            {
              "$ref": "#/$defs/ConnectivityTimestamp"
            },
            {
              "description": "The epoch time (in milliseconds) when the thing last connected or disconnected. If the thing has been disconnected for approximately an hour, the time value might be missing."
            }
          ]
        },
        "disconnectReason": {
          "allOf": [
            {
              "$ref": "#/$defs/DisconnectReason"
            },
            {
              "description": "The reason why the client is disconnected. If the thing has been disconnected for approximately an hour, the <code>disconnectReason</code> value might be missing."
            }
          ]
        }
      },
      "description": "The connectivity status of the thing."
    },
    "ThingDocument": {
      "type": "object",
      "properties": {
        "thingName": {
          "allOf": [
            {
              "$ref": "#/$defs/ThingName"
            },
            {
              "description": "The thing name."
            }
          ]
        },
        "thingId": {
          "allOf": [
            {
              "$ref": "#/$defs/ThingId"
            },
            {
              "description": "The thing ID."
            }
          ]
        },
        "thingTypeName": {
          "allOf": [
            {
              "$ref": "#/$defs/ThingTypeName"
            },
            {
              "description": "The thing type name."
            }
          ]
        },
        "thingGroupNames": {
          "allOf": [
            {
              "$ref": "#/$defs/ThingGroupNameList"
            },
            {
              "description": "Thing group names."
            }
          ]
        },
        "attributes": {
          "allOf": [
            {
              "$ref": "#/$defs/Attributes"
            },
            {
              "description": "The attributes."
            }
          ]
        },
        "shadow": {
          "allOf": [
            {
              "$ref": "#/$defs/JsonDocument"
            },
            {
              "description": "<p>The unnamed shadow and named shadow.</p> <p>For more information about shadows, see <a href=\"https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html\">IoT Device Shadow service.</a> </p>"
            }
          ]
        },
        "deviceDefender": {
          "allOf": [
            {
              "$ref": "#/$defs/JsonDocument"
            },
            {
              "description": "<p>Contains Device Defender data.</p> <p>For more information about Device Defender, see <a href=\"https://docs.aws.amazon.com/iot/latest/developerguide/device-defender.html\">Device Defender</a>. </p>"
            }
          ]
        },
        "connectivity": {
          "allOf": [
            {
              "$ref": "#/$defs/ThingConnectivity"
            },
            {
              "description": "Indicates whether the thing is connected to the Amazon Web Services IoT Core service."
            }
          ]
        }
      },
      "description": "The thing search index document."
    },
    "ThingDocumentList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ThingDocument"
      }
    },
    "ThingGroupDescription": {
      "type": "string",
      "pattern": "[\\p{Graph}\\x20]*",
      "maxLength": 2028
    },
    "ThingGroupDocument": {
      "type": "object",
      "properties": {
        "thingGroupName": {
          "allOf": [
            {
              "$ref": "#/$defs/ThingGroupName"
            },
            {
              "description": "The thing group name."
            }
          ]
        },
        "thingGroupId": {
          "allOf": [
            {
              "$ref": "#/$defs/ThingGroupId"
            },
            {
              "description": "The thing group ID."
            }
          ]
        },
        "thingGroupDescription": {
          "allOf": [
            {
              "$ref": "#/$defs/ThingGroupDescription"
            },
            {
              "description": "The thing group description."
            }
          ]
        },
        "attributes": {
          "allOf": [
            {
              "$ref": "#/$defs/Attributes"
            },
            {
              "description": "The thing group attributes."
            }
          ]
        },
        "parentGroupNames": {
          "allOf": [
            {
              "$ref": "#/$defs/ThingGroupNameList"
            },
            {
              "description": "Parent group names."
            }
          ]
        }
      },
      "description": "The thing group search index document."
    },
    "ThingGroupDocumentList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ThingGroupDocument"
      }
    },
    "ThingGroupId": {
      "type": "string",
      "pattern": "[a-zA-Z0-9\\-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "ThingGroupName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9:_-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "ThingGroupNameList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ThingGroupName"
      }
    },
    "ThingId": {
      "type": "string"
    },
    "ThingName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9:_-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "ThingTypeName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9:_-]+",
      "minLength": 1,
      "maxLength": 128
    }
  }
}