{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/Size",
  "/properties/VpcSettings",
  "/properties/Name",
  "/properties/Password",
  "/properties/ShortName",
  "/properties/Description",
  "/properties/CreateAlias"
 ],
 "definitions": {
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$",
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$",
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "VpcSettings": {
   "$comment": "Contains VPC information",
   "additionalProperties": false,
   "properties": {
    "SubnetIds": {
     "insertionOrder": false,
     "items": {
      "pattern": "^(subnet-[0-9a-f]{8}|subnet-[0-9a-f]{17})$",
      "type": "string"
     },
     "type": "array",
     "uniqueItems": true
    },
    "VpcId": {
     "format": "AWS::EC2::VPC.Id",
     "pattern": "^(vpc-[0-9a-f]{8}|vpc-[0-9a-f]{17})$",
     "type": "string"
    }
   },
   "required": [
    "VpcId",
    "SubnetIds"
   ],
   "type": "object"
  }
 },
 "documentationUrl": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-directoryservice-simplead.html",
 "primaryIdentifier": [
  "/properties/DirectoryId"
 ],
 "properties": {
  "Alias": {
   "maxLength": 62,
   "minLength": 1,
   "pattern": "^(?!D-|d-)([\\da-zA-Z]+)([-]*[\\da-zA-Z])*$",
   "type": "string"
  },
  "CreateAlias": {
   "type": "boolean"
  },
  "Description": {
   "maxLength": 128,
   "minLength": 0,
   "pattern": "^([a-zA-Z0-9_])[\\\\a-zA-Z0-9_@#%*+=:?./!\\s-]*$",
   "type": "string"
  },
  "DirectoryId": {
   "pattern": "^d-[0-9a-f]{10}$",
   "type": "string"
  },
  "DnsIpAddresses": {
   "insertionOrder": false,
   "items": {
    "type": "string"
   },
   "type": "array",
   "uniqueItems": false
  },
  "EnableSso": {
   "type": "boolean"
  },
  "Name": {
   "pattern": "^([a-zA-Z0-9]+[\\\\.-])+([a-zA-Z0-9])+$",
   "type": "string"
  },
  "Password": {
   "pattern": "^(?=^.{8,64}$)((?=.*\\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[^A-Za-z0-9\\s])(?=.*[a-z])|(?=.*[^A-Za-z0-9\\s])(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\\s]))^",
   "type": "string"
  },
  "ShortName": {
   "pattern": "^[^\\\\/:*?\"<>|.]+[^\\\\/:*?\"<>|]*$",
   "type": "string"
  },
  "Size": {
   "enum": [
    "Large",
    "Small"
   ],
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": false
  },
  "VpcSettings": {
   "$ref": "#/definitions/VpcSettings"
  }
 },
 "readOnlyProperties": [
  "/properties/Alias",
  "/properties/DnsIpAddresses",
  "/properties/DirectoryId"
 ],
 "required": [
  "VpcSettings",
  "Size",
  "Name"
 ],
 "tagging": {
  "cloudFormationSystemTags": false,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::DirectoryService::SimpleAD",
 "writeOnlyProperties": [
  "/properties/Password"
 ]
}
