{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-datasync-locationefs.json",
  "title": "AWSDataSyncLocationEFSProperties",
  "description": "Resource schema for AWS::DataSync::LocationEFS.. 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-locationefs.json",
    "sourceSha256": "8d05cf7778adbfb810dfe9af05e56c79ec05e5cace7b19a3866649a0008a62d5"
  },
  "type": "object",
  "properties": {
    "Ec2Config": {
      "$ref": "#/$defs/Ec2Config"
    },
    "EfsFilesystemArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):elasticfilesystem:[a-z\\-0-9]*:[0-9]{12}:file-system/fs-.*$",
          "maxLength": 128
        },
        {
          "$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 Amazon EFS file system."
    },
    "AccessPointArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):elasticfilesystem:[a-z\\-0-9]+:[0-9]{12}:access-point/fsap-[0-9a-f]{8,40}$",
          "maxLength": 128
        },
        {
          "$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 Amazon EFS Access point that DataSync uses when accessing the EFS file system."
    },
    "FileSystemAccessRoleArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):iam::[0-9]{12}:role/.*$",
          "maxLength": 128
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon Resource Name (ARN) of the AWS IAM role that the DataSync will assume when mounting the EFS file system."
    },
    "InTransitEncryption": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "NONE",
            "TLS1_2"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Protocol that is used for encrypting the traffic exchanged between the DataSync Agent and the EFS file system."
    },
    "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. This subdirectory in the EFS file system is used to read data from the EFS source location or write data to the EFS destination."
    },
    "Tags": {
      "description": "An array of key-value pairs to apply to this resource.",
      "type": "array",
      "maxItems": 50,
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::DataSync::LocationEFS",
  "writeOnlyProperties": [
    "/properties/EfsFilesystemArn",
    "/properties/Subdirectory"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-datasync.git",
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/Ec2Config",
    "/properties/EfsFilesystemArn",
    "/properties/Subdirectory",
    "/properties/FileSystemAccessRoleArn",
    "/properties/InTransitEncryption",
    "/properties/AccessPointArn"
  ],
  "$defs": {
    "Ec2Config": {
      "title": "AWSDataSyncLocationEFSEc2ConfigDefinition",
      "description": "The subnet and security group that DataSync uses to access target EFS file system.",
      "type": "object",
      "properties": {
        "SecurityGroupArns": {
          "description": "The Amazon Resource Names (ARNs) of the security groups that are configured for the Amazon EC2 resource.",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:security-group/.*$",
            "maxLength": 128
          },
          "minItems": 1,
          "maxItems": 5,
          "insertionOrder": false
        },
        "SubnetArn": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\\-0-9]*:[0-9]{12}:subnet/.*$",
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The ARN of the subnet that DataSync uses to access the target EFS file system."
        }
      },
      "required": [
        "SecurityGroupArns",
        "SubnetArn"
      ],
      "additionalProperties": false
    },
    "Tag": {
      "title": "AWSDataSyncLocationEFSTagDefinition",
      "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
    }
  },
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "required": [
    "Ec2Config"
  ],
  "readOnlyProperties": [
    "/properties/LocationArn",
    "/properties/LocationUri"
  ],
  "primaryIdentifier": [
    "/properties/LocationArn"
  ]
}
