{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-datasync-locationobjectstorage.json",
  "title": "AWSDataSyncLocationObjectStorageProperties",
  "description": "Resource schema for AWS::DataSync::LocationObjectStorage.. 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-locationobjectstorage.json",
    "sourceSha256": "8ad9dbe9679439101d3ef39acc2dc6933d0f1500449304de7dfab45c9ae58a7a"
  },
  "type": "object",
  "properties": {
    "AccessKey": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "pattern": "^.+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Optional. The access key is used if credentials are required to access the self-managed object storage server."
    },
    "AgentArns": {
      "description": "The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.",
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 128,
        "pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$"
      },
      "minItems": 1,
      "maxItems": 4,
      "insertionOrder": false
    },
    "BucketName": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 63,
          "minLength": 3,
          "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": "The name of the bucket on the self-managed object storage server."
    },
    "SecretKey": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 8,
          "maxLength": 200,
          "pattern": "^.+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Optional. The secret key is used if credentials are required to access the self-managed object storage server."
    },
    "ServerCertificate": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 32768
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "X.509 PEM content containing a certificate authority or chain to trust."
    },
    "ServerHostname": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 255,
          "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 self-managed object storage server. This value is the IP address or Domain Name Service (DNS) name of the object storage server."
    },
    "ServerPort": {
      "description": "The port that your self-managed server accepts inbound network traffic on.",
      "type": "integer",
      "minimum": 1,
      "maximum": 65536
    },
    "ServerProtocol": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "HTTPS",
            "HTTP"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The protocol that the object storage server uses to communicate."
    },
    "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": "The subdirectory in the self-managed object storage server that is used to read data from."
    },
    "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::LocationObjectStorage",
  "createOnlyProperties": [
    "/properties/BucketName",
    "/properties/ServerHostname"
  ],
  "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": "AWSDataSyncLocationObjectStorageTagDefinition",
      "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
    }
  },
  "required": [
    "AgentArns"
  ],
  "readOnlyProperties": [
    "/properties/LocationArn",
    "/properties/LocationUri"
  ],
  "writeOnlyProperties": [
    "/properties/SecretKey",
    "/properties/BucketName",
    "/properties/ServerHostname",
    "/properties/Subdirectory"
  ]
}
