{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-connect/json-schema/amazon-connect-create-template-request-schema.json",
  "title": "CreateTemplateRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-connect-templates-api-openapi.yml#/components/schemas/CreateTemplateRequest",
  "type": "object",
  "properties": {
    "domainId": {
      "type": "string",
      "description": "The unique identifier of the Cases domain."
    },
    "name": {
      "type": "string",
      "description": "A name for the template. It must be unique per domain."
    },
    "description": {
      "type": "string",
      "description": "A brief description of the template."
    },
    "layoutConfiguration": {
      "$ref": "#/$defs/LayoutConfiguration"
    },
    "requiredFields": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RequiredField"
      },
      "description": "A list of fields that must contain a value for a case to be successfully created with this template. To require a Customer Profile when creating cases, include customer_id in this list. If customer_id is omitted, the Customer Profile field is optional and can be added, changed, or removed after case creation."
    },
    "status": {
      "type": "string",
      "description": "The status of the template."
    },
    "rules": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TemplateRule"
      },
      "description": "A list of case rules (also known as case field conditions) on a template."
    },
    "tagPropagationConfigurations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TagPropagationConfiguration"
      },
      "description": "Defines tag propagation configuration for resources created within a domain. Tags specified here will be automatically applied to resources being created for the specified resource type."
    }
  },
  "required": [
    "domainId",
    "name"
  ],
  "$defs": {
    "LayoutConfiguration": {
      "type": "object",
      "properties": {
        "defaultLayout": {
          "type": "string",
          "description": "Unique identifier of a layout."
        }
      }
    },
    "RequiredField": {
      "type": "object",
      "properties": {
        "fieldId": {
          "type": "string",
          "description": "Unique identifier of a field."
        }
      },
      "required": [
        "fieldId"
      ]
    },
    "TagPropagationConfiguration": {
      "type": "object",
      "properties": {
        "resourceType": {
          "type": "string",
          "description": "Supported resource types for tag propagation. Determines which resources will receive automatically propagated tags."
        },
        "tagMap": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags that will be applied to the created resource."
        }
      },
      "required": [
        "resourceType",
        "tagMap"
      ]
    },
    "TemplateRule": {
      "type": "object",
      "properties": {
        "caseRuleId": {
          "type": "string",
          "description": "Unique identifier of a case rule."
        },
        "fieldId": {
          "type": "string",
          "description": "Unique identifier of a field."
        }
      },
      "required": [
        "caseRuleId"
      ]
    }
  }
}