{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-datasync-locations3.json",
  "title": "AWSDataSyncLocationS3Properties",
  "description": "Resource schema for AWS::DataSync::LocationS3. 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-locations3.json",
    "sourceSha256": "744f2eb466c79f346e23b8928b6d4a3acc7aaedb6a7900865e0fe052702d5e25"
  },
  "type": "object",
  "properties": {
    "S3Config": {
      "$ref": "#/$defs/S3Config"
    },
    "S3BucketArn": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 156,
          "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):s3:[a-z\\-0-9]*:[0-9]*:.*$"
        },
        {
          "$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 Amazon S3 bucket."
    },
    "Subdirectory": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^[\\p{L}\\p{M}\\p{Z}\\p{S}\\p{N}\\p{P}\\p{C}]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3 is used to read data from the S3 source location or write data to the S3 destination."
    },
    "S3StorageClass": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "STANDARD",
            "STANDARD_IA",
            "ONEZONE_IA",
            "INTELLIGENT_TIERING",
            "GLACIER",
            "GLACIER_INSTANT_RETRIEVAL",
            "DEEP_ARCHIVE"
          ],
          "default": "STANDARD"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon S3 storage class you want to store your files in when this location is used as a task 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::LocationS3",
  "writeOnlyProperties": [
    "/properties/Subdirectory",
    "/properties/S3BucketArn"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-datasync.git",
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/S3Config",
    "/properties/S3StorageClass",
    "/properties/Subdirectory",
    "/properties/S3BucketArn"
  ],
  "$defs": {
    "S3Config": {
      "title": "AWSDataSyncLocationS3S3ConfigDefinition",
      "description": "The Amazon Resource Name (ARN) of the AWS IAM role that is used to access an Amazon S3 bucket.",
      "type": "object",
      "properties": {
        "BucketAccessRoleArn": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):iam::[0-9]{12}:role/.*$",
              "maxLength": 2048
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The ARN of the IAM role of the Amazon S3 bucket."
        }
      },
      "required": [
        "BucketAccessRoleArn"
      ],
      "additionalProperties": false
    },
    "Tag": {
      "title": "AWSDataSyncLocationS3TagDefinition",
      "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": [
    "S3Config"
  ],
  "readOnlyProperties": [
    "/properties/LocationArn",
    "/properties/LocationUri"
  ],
  "primaryIdentifier": [
    "/properties/LocationArn"
  ]
}
