{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-datasync-locationfsxontap.json",
  "title": "AWSDataSyncLocationFSxONTAPProperties",
  "description": "Resource schema for AWS::DataSync::LocationFSxONTAP.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-datasync.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-datasync-locationfsxontap.json",
    "sourceSha256": "e301d9a62b7c0fcfae3cd48b52394383df3e6afbc1a4f4692c885708d84ab477"
  },
  "type": "object",
  "properties": {
    "StorageVirtualMachineArn": {
      "oneOf": [
        {
          "type": "string",
          "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,}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon Resource Name (ARN) for the FSx ONTAP SVM."
    },
    "SecurityGroupArns": {
      "description": "The ARNs of the security groups that are to use to configure the FSx ONTAP file system.",
      "type": "array",
      "items": {
        "type": "string",
        "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]+$"
      },
      "maxItems": 5,
      "minItems": 1,
      "insertionOrder": false
    },
    "Protocol": {
      "$ref": "#/$defs/Protocol"
    },
    "Subdirectory": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 4096,
          "pattern": "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A subdirectory in the location's path."
    },
    "Tags": {
      "description": "An array of key-value pairs to apply to this resource.",
      "type": "array",
      "maxItems": 50,
      "minItems": 0,
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::DataSync::LocationFSxONTAP",
  "createOnlyProperties": [
    "/properties/StorageVirtualMachineArn",
    "/properties/SecurityGroupArns",
    "/properties/Protocol",
    "/properties/Subdirectory"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-datasync.git",
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/LocationArn"
  ],
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "$defs": {
    "Tag": {
      "title": "AWSDataSyncLocationFSxONTAPTagDefinition",
      "description": "A key-value pair to associate with a resource.",
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[a-zA-Z0-9\\s+=._:/-]+$",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The key for an AWS resource tag."
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[a-zA-Z0-9\\s+=._:@/-]+$",
              "maxLength": 256,
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value for an AWS resource tag."
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    },
    "Protocol": {
      "title": "AWSDataSyncLocationFSxONTAPProtocolDefinition",
      "description": "Configuration settings for NFS or SMB protocol.",
      "type": "object",
      "properties": {
        "NFS": {
          "$ref": "#/$defs/NFS"
        },
        "SMB": {
          "$ref": "#/$defs/SMB"
        }
      },
      "additionalProperties": false
    },
    "NFS": {
      "title": "AWSDataSyncLocationFSxONTAPNFSDefinition",
      "description": "NFS protocol configuration for FSx ONTAP file system.",
      "type": "object",
      "properties": {
        "MountOptions": {
          "$ref": "#/$defs/NfsMountOptions"
        }
      },
      "required": [
        "MountOptions"
      ],
      "additionalProperties": false
    },
    "SMB": {
      "title": "AWSDataSyncLocationFSxONTAPSMBDefinition",
      "description": "SMB protocol configuration for FSx ONTAP file system.",
      "type": "object",
      "properties": {
        "MountOptions": {
          "$ref": "#/$defs/SmbMountOptions"
        },
        "Domain": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 253,
              "pattern": "^([A-Za-z0-9]+[A-Za-z0-9-.]*)*[A-Za-z0-9-]*[A-Za-z0-9]$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the Windows domain that the SMB server belongs to."
        },
        "Password": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 104,
              "pattern": "^.{0,104}$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The password of the user who can mount the share and has the permissions to access files and folders in the SMB share."
        },
        "User": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 104,
              "pattern": "^[^\\x5B\\x5D\\\\/:;|=,+*?]{1,104}$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The user who can mount the share, has the permissions to access files and folders in the SMB share."
        }
      },
      "required": [
        "User",
        "Password",
        "MountOptions"
      ],
      "additionalProperties": false
    },
    "NfsMountOptions": {
      "title": "AWSDataSyncLocationFSxONTAPNfsMountOptionsDefinition",
      "description": "The NFS mount options that DataSync can use to mount your NFS share.",
      "type": "object",
      "properties": {
        "Version": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "AUTOMATIC",
                "NFS3",
                "NFS4_0",
                "NFS4_1"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The specific NFS version that you want DataSync to use to mount your NFS share."
        }
      },
      "additionalProperties": false
    },
    "SmbMountOptions": {
      "title": "AWSDataSyncLocationFSxONTAPSmbMountOptionsDefinition",
      "description": "The mount options used by DataSync to access the SMB server.",
      "type": "object",
      "properties": {
        "Version": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "AUTOMATIC",
                "SMB2",
                "SMB3"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The specific SMB version that you want DataSync to use to mount your SMB share."
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "SecurityGroupArns",
    "StorageVirtualMachineArn"
  ],
  "readOnlyProperties": [
    "/properties/LocationArn",
    "/properties/LocationUri",
    "/properties/FsxFilesystemArn"
  ],
  "writeOnlyProperties": [
    "/properties/Protocol",
    "/properties/Subdirectory"
  ]
}
