{
  "typeName" : "AWS::CustomerProfiles::Domain",
  "description" : "A domain defined for 3rd party data source in Profile Service",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-customer-profiles.git",
  "definitions" : {
    "Tag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "pattern" : "^(?!aws:)[a-zA-Z+-=._:/]+$",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "additionalProperties" : false,
      "required" : [ "Key", "Value" ]
    }
  },
  "properties" : {
    "DomainName" : {
      "description" : "The unique name of the domain.",
      "type" : "string",
      "pattern" : "^[a-zA-Z0-9_-]+$",
      "minLength" : 1,
      "maxLength" : 64
    },
    "DeadLetterQueueUrl" : {
      "description" : "The URL of the SQS dead letter queue",
      "type" : "string",
      "minLength" : 0,
      "maxLength" : 255
    },
    "DefaultEncryptionKey" : {
      "description" : "The default encryption key",
      "type" : "string",
      "minLength" : 0,
      "maxLength" : 255
    },
    "DefaultExpirationDays" : {
      "description" : "The default number of days until the data within the domain expires.",
      "type" : "integer",
      "minimum" : 1,
      "maximum" : 1098
    },
    "Tags" : {
      "description" : "The tags (keys and values) associated with the domain",
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "minItems" : 0,
      "maxItems" : 50
    },
    "CreatedAt" : {
      "description" : "The time of this integration got created",
      "type" : "string"
    },
    "LastUpdatedAt" : {
      "description" : "The time of this integration got last updated at",
      "type" : "string"
    }
  },
  "additionalProperties" : false,
  "required" : [ "DomainName" ],
  "readOnlyProperties" : [ "/properties/LastUpdatedAt", "/properties/CreatedAt" ],
  "createOnlyProperties" : [ "/properties/DomainName" ],
  "primaryIdentifier" : [ "/properties/DomainName" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "profile:CreateDomain" ]
    },
    "read" : {
      "permissions" : [ "profile:GetDomain" ]
    },
    "update" : {
      "permissions" : [ "profile:UpdateDomain", "profile:UntagResource", "profile:TagResource" ]
    },
    "delete" : {
      "permissions" : [ "profile:DeleteDomain" ]
    },
    "list" : {
      "permissions" : [ "profile:ListDomains" ]
    }
  }
}