{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-core/json-schema/amazon-iot-core-create-provisioning-template-request-schema.json",
  "title": "CreateProvisioningTemplateRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-core-provisioning-templates-api-openapi.yml#/components/schemas/CreateProvisioningTemplateRequest",
  "type": "object",
  "properties": {
    "templateName": {
      "type": "string",
      "description": "The name of the provisioning template."
    },
    "description": {
      "type": "string",
      "description": "The description of the provisioning template."
    },
    "templateBody": {
      "type": "string",
      "description": "The JSON formatted contents of the provisioning template."
    },
    "enabled": {
      "type": "boolean",
      "description": "True to enable the provisioning template, otherwise false."
    },
    "provisioningRoleArn": {
      "type": "string",
      "description": "The role ARN for the role associated with the provisioning template. This IoT role grants permission to provision a device."
    },
    "preProvisioningHook": {
      "$ref": "#/$defs/ProvisioningHook"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "Metadata which can be used to manage the provisioning template. For URI Request parameters use format: ...key1=value1&key2=value2... For the CLI command-line parameter use format: &&tags \"key1=value1&key2=value2...\" For the cli-input-json file use format: \"tags\": \"key1=value1&key2=value2...\""
    },
    "type": {
      "type": "string",
      "enum": [
        "FLEET_PROVISIONING",
        "JITP"
      ],
      "description": "The type you define in a provisioning template. You can create a template with only one type. You can't change the template type after its creation. The default value is FLEET_PROVISIONING. For more information about provisioning template, see: Provisioning template."
    }
  },
  "required": [
    "templateName",
    "templateBody",
    "provisioningRoleArn"
  ],
  "$defs": {
    "ProvisioningHook": {
      "type": "object",
      "properties": {
        "payloadVersion": {
          "type": "string",
          "description": "The payload that was sent to the target function. Note: Only Lambda functions are currently supported."
        },
        "targetArn": {
          "type": "string",
          "description": "The ARN of the target function. Note: Only Lambda functions are currently supported."
        }
      },
      "required": [
        "targetArn"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The tag's key."
        },
        "Value": {
          "type": "string",
          "description": "The tag's value."
        }
      },
      "required": [
        "Key"
      ]
    }
  }
}