{
  "typeName" : "AWS::Cases::Domain",
  "description" : "A domain, which is a container for all case data, such as cases, fields, templates and layouts. Each Amazon Connect instance can be associated with only one Cases domain.",
  "definitions" : {
    "DomainStatus" : {
      "type" : "string",
      "description" : "The current status of the Cases domain. Indicates whether the domain is Active, CreationInProgress, or CreationFailed.",
      "enum" : [ "Active", "CreationInProgress", "CreationFailed" ]
    },
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "description" : "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 128,
          "pattern" : "^(?!aws:)[a-zA-Z+-=._:/]+$"
        },
        "Value" : {
          "description" : "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Value", "Key" ]
    }
  },
  "properties" : {
    "CreatedTime" : {
      "type" : "string",
      "description" : "The time at which the domain was created.",
      "format" : "date-time"
    },
    "DomainArn" : {
      "type" : "string",
      "maxLength" : 500,
      "minLength" : 1,
      "description" : "The Amazon Resource Name (ARN) for the Cases domain."
    },
    "DomainId" : {
      "type" : "string",
      "maxLength" : 500,
      "minLength" : 1,
      "description" : "The unique identifier of the Cases domain."
    },
    "DomainStatus" : {
      "$ref" : "#/definitions/DomainStatus"
    },
    "Name" : {
      "type" : "string",
      "maxLength" : 100,
      "minLength" : 1,
      "pattern" : "^.*[\\S]$",
      "description" : "The name for your Cases domain. It must be unique for your AWS account."
    },
    "Tags" : {
      "type" : "array",
      "description" : "The tags that you attach to this domain.",
      "uniqueItems" : false,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "required" : [ "Name" ],
  "readOnlyProperties" : [ "/properties/CreatedTime", "/properties/DomainArn", "/properties/DomainId", "/properties/DomainStatus" ],
  "createOnlyProperties" : [ "/properties/Name" ],
  "primaryIdentifier" : [ "/properties/DomainArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "cases:CreateDomain", "cases:GetDomain", "cases:TagResource" ]
    },
    "read" : {
      "permissions" : [ "cases:GetDomain" ]
    },
    "delete" : {
      "permissions" : [ "cases:DeleteDomain", "cases:UntagResource" ]
    },
    "list" : {
      "permissions" : [ "cases:ListDomains" ]
    },
    "update" : {
      "permissions" : [ "cases:TagResource", "cases:UntagResource", "cases:GetDomain" ]
    }
  },
  "additionalProperties" : false,
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : false,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "cases:GetDomain", "cases:TagResource", "cases:UntagResource" ]
  }
}