{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-core/json-schema/amazon-iot-core-update-thing-request-schema.json",
  "title": "UpdateThingRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-core-things-api-openapi.yml#/components/schemas/UpdateThingRequest",
  "type": "object",
  "properties": {
    "thingName": {
      "type": "string",
      "description": "The name of the thing to update. You can't change a thing's name. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing."
    },
    "thingTypeName": {
      "type": "string",
      "description": "The name of the thing type."
    },
    "attributePayload": {
      "$ref": "#/$defs/AttributePayload"
    },
    "expectedVersion": {
      "type": "integer",
      "description": "The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the UpdateThing request is rejected with a VersionConflictException."
    },
    "removeThingType": {
      "type": "boolean",
      "description": "Remove a thing type association. If true, the association is removed."
    }
  },
  "required": [
    "thingName"
  ],
  "$defs": {
    "AttributePayload": {
      "type": "object",
      "properties": {
        "attributes": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A JSON string containing up to three key-value pair in JSON format. For example: {\\\"attributes\\\":{\\\"string1\\\":\\\"string2\\\"}}"
        },
        "merge": {
          "type": "boolean",
          "description": "Specifies whether the list of attributes provided in the AttributePayload is merged with the attributes stored in the registry, instead of overwriting them. To remove an attribute, call UpdateThing with an empty attribute value. The merge attribute is only valid when calling UpdateThing or UpdateThingGroup."
        }
      }
    }
  }
}