{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/StorageVirtualMachineArn",
  "/properties/SecurityGroupArns"
 ],
 "definitions": {
  "NFS": {
   "additionalProperties": false,
   "properties": {
    "MountOptions": {
     "$ref": "#/definitions/NfsMountOptions"
    }
   },
   "required": [
    "MountOptions"
   ],
   "type": "object"
  },
  "NfsMountOptions": {
   "additionalProperties": false,
   "properties": {
    "Version": {
     "enum": [
      "AUTOMATIC",
      "NFS3",
      "NFS4_0",
      "NFS4_1"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "Protocol": {
   "additionalProperties": false,
   "properties": {
    "NFS": {
     "$ref": "#/definitions/NFS"
    },
    "SMB": {
     "$ref": "#/definitions/SMB"
    }
   },
   "type": "object"
  },
  "SMB": {
   "additionalProperties": false,
   "properties": {
    "Domain": {
     "maxLength": 253,
     "pattern": "^([A-Za-z0-9]+[A-Za-z0-9-.]*)*[A-Za-z0-9-]*[A-Za-z0-9]$",
     "type": "string"
    },
    "MountOptions": {
     "$ref": "#/definitions/SmbMountOptions"
    },
    "Password": {
     "maxLength": 104,
     "pattern": "^.{0,104}$",
     "type": "string"
    },
    "User": {
     "maxLength": 104,
     "pattern": "^[^\\x5B\\x5D\\\\/:;|=,+*?]{1,104}$",
     "type": "string"
    }
   },
   "required": [
    "User",
    "Password",
    "MountOptions"
   ],
   "type": "object"
  },
  "SmbMountOptions": {
   "additionalProperties": false,
   "properties": {
    "Version": {
     "enum": [
      "AUTOMATIC",
      "SMB2",
      "SMB3"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 256,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9\\s+=._:/-]+$",
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9\\s+=._:@/-]+$",
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/LocationArn"
 ],
 "properties": {
  "FsxFilesystemArn": {
   "maxLength": 128,
   "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):fsx:[a-z\\-0-9]+:[0-9]{12}:file-system/fs-[0-9a-f]+$",
   "type": "string"
  },
  "LocationArn": {
   "maxLength": 128,
   "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$",
   "type": "string"
  },
  "LocationUri": {
   "maxLength": 4360,
   "pattern": "^(efs|nfs|s3|smb|hdfs|fsx[a-z0-9-]+)://[a-zA-Z0-9.:/\\-]+$",
   "type": "string"
  },
  "Protocol": {
   "$ref": "#/definitions/Protocol"
  },
  "SecurityGroupArns": {
   "insertionOrder": false,
   "items": {
    "maxLength": 128,
    "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/sg-[a-f0-9]+$",
    "type": "string"
   },
   "maxItems": 5,
   "minItems": 1,
   "type": "array"
  },
  "StorageVirtualMachineArn": {
   "maxLength": 162,
   "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):fsx:[a-z\\-0-9]+:[0-9]{12}:storage-virtual-machine/fs-[0-9a-f]+/svm-[0-9a-f]{17,}$",
   "type": "string"
  },
  "Subdirectory": {
   "maxLength": 4096,
   "pattern": "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$",
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "minItems": 0,
   "type": "array",
   "uniqueItems": true
  }
 },
 "readOnlyProperties": [
  "/properties/LocationArn",
  "/properties/LocationUri",
  "/properties/FsxFilesystemArn"
 ],
 "required": [
  "SecurityGroupArns",
  "StorageVirtualMachineArn"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-datasync.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::DataSync::LocationFSxONTAP",
 "writeOnlyProperties": [
  "/properties/Protocol/SMB/Password",
  "/properties/Subdirectory"
 ]
}
