{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-s3outposts-bucket.json",
  "title": "AWSS3OutpostsBucketProperties",
  "description": "Resource Type Definition for AWS::S3Outposts::Bucket. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-s3outposts.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-s3outposts-bucket.json",
    "sourceSha256": "0c4c82a8e5727ec59bf7a74d1ecf4f2b382b113f1c88b7b0bac09875a9874975"
  },
  "type": "object",
  "properties": {
    "BucketName": {
      "oneOf": [
        {
          "maxLength": 63,
          "minLength": 3,
          "pattern": "(?=^.{3,63}$)(?!^(\\d+\\.)+\\d+$)(^(([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])$)",
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A name for the bucket."
    },
    "OutpostId": {
      "oneOf": [
        {
          "pattern": "^(op-[a-f0-9]{17}|\\d{12}|ec2)$",
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The id of the customer outpost on which the bucket resides."
    },
    "Tags": {
      "description": "An arbitrary set of tags (key-value pairs) for this S3Outposts bucket.",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "type": "array",
      "insertionOrder": false,
      "uniqueItems": true
    },
    "LifecycleConfiguration": {
      "description": "Rules that define how Amazon S3Outposts manages objects during their lifetime.",
      "$ref": "#/$defs/LifecycleConfiguration"
    }
  },
  "typeName": "AWS::S3Outposts::Bucket",
  "required": [
    "BucketName",
    "OutpostId"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-s3outposts.git",
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/Arn"
  ],
  "taggable": true,
  "$defs": {
    "Tag": {
      "type": "object",
      "title": "AWSS3OutpostsBucketTagDefinition",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024,
              "pattern": "^(?!aws:.*)([\\p{L}\\p{Z}\\p{N}_.:=+\\/\\-@%]*)$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024,
              "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:=+\\/\\-@%]*)$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    },
    "LifecycleConfiguration": {
      "type": "object",
      "title": "AWSS3OutpostsBucketLifecycleConfigurationDefinition",
      "properties": {
        "Rules": {
          "description": "A list of lifecycle rules for individual objects in an Amazon S3Outposts bucket.",
          "type": "array",
          "insertionOrder": false,
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/Rule"
          }
        }
      },
      "required": [
        "Rules"
      ],
      "additionalProperties": false
    },
    "Rule": {
      "description": "Specifies lifecycle rules for an Amazon S3Outposts bucket. You must specify at least one of the following: AbortIncompleteMultipartUpload, ExpirationDate, ExpirationInDays.",
      "type": "object",
      "title": "AWSS3OutpostsBucketRuleDefinition",
      "properties": {
        "Status": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "Enabled",
                "Disabled"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Id": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Unique identifier for the lifecycle rule. The value can't be longer than 255 characters."
        },
        "AbortIncompleteMultipartUpload": {
          "description": "Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3Outposts bucket.",
          "$ref": "#/$defs/AbortIncompleteMultipartUpload"
        },
        "ExpirationDate": {
          "description": "Indicates when objects are deleted from Amazon S3Outposts. The date value must be in ISO 8601 format. The time is always midnight UTC.",
          "$ref": "#/$defs/iso8601UTC"
        },
        "ExpirationInDays": {
          "description": "Indicates the number of days after creation when objects are deleted from Amazon S3Outposts.",
          "type": "integer",
          "minimum": 1
        },
        "Filter": {
          "description": "The container for the filter of the lifecycle rule.",
          "type": "object",
          "oneOf": [
            {
              "required": [
                "Prefix"
              ]
            },
            {
              "required": [
                "Tag"
              ]
            },
            {
              "required": [
                "AndOperator"
              ]
            }
          ],
          "properties": {
            "Prefix": {
              "description": "Object key prefix that identifies one or more objects to which this rule applies.",
              "$ref": "#/$defs/FilterPrefix"
            },
            "Tag": {
              "description": "Specifies a tag used to identify a subset of objects for an Amazon S3Outposts bucket.",
              "$ref": "#/$defs/FilterTag"
            },
            "AndOperator": {
              "description": "The container for the AND condition for the lifecycle rule. A combination of Prefix and 1 or more Tags OR a minimum of 2 or more tags.",
              "$ref": "#/$defs/FilterAndOperator"
            }
          },
          "additionalProperties": false
        }
      },
      "anyOf": [
        {
          "required": [
            "Status",
            "AbortIncompleteMultipartUpload"
          ]
        },
        {
          "required": [
            "Status",
            "ExpirationDate"
          ]
        },
        {
          "required": [
            "Status",
            "ExpirationInDays"
          ]
        }
      ],
      "additionalProperties": false
    },
    "iso8601UTC": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^([0-2]\\d{3})-(0[0-9]|1[0-2])-([0-2]\\d|3[01])T([01]\\d|2[0-4]):([0-5]\\d):([0-6]\\d)((\\.\\d{3})?)Z$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The date value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ssZ)",
      "title": "AWSS3OutpostsBucketiso8601UTCDefinition"
    },
    "AbortIncompleteMultipartUpload": {
      "description": "Specifies the days since the initiation of an incomplete multipart upload that Amazon S3Outposts will wait before permanently removing all parts of the upload.",
      "type": "object",
      "title": "AWSS3OutpostsBucketAbortIncompleteMultipartUploadDefinition",
      "properties": {
        "DaysAfterInitiation": {
          "description": "Specifies the number of days after which Amazon S3Outposts aborts an incomplete multipart upload.",
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "DaysAfterInitiation"
      ],
      "additionalProperties": false
    },
    "FilterPrefix": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Prefix identifies one or more objects to which the rule applies.",
      "title": "AWSS3OutpostsBucketFilterPrefixDefinition"
    },
    "FilterTag": {
      "description": "Tag used to identify a subset of objects for an Amazon S3Outposts bucket.",
      "type": "object",
      "title": "AWSS3OutpostsBucketFilterTagDefinition",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024,
              "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:=+\\/\\-@%]*)$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024,
              "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:=+\\/\\-@%]*)$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    },
    "FilterAndOperator": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "Prefix": {
              "description": "Prefix identifies one or more objects to which the rule applies.",
              "$ref": "#/$defs/FilterPrefix"
            },
            "Tags": {
              "description": "All of these tags must exist in the object's tag set in order for the rule to apply.",
              "type": "array",
              "insertionOrder": false,
              "uniqueItems": true,
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/FilterTag"
              }
            }
          },
          "required": [
            "Tags"
          ],
          "additionalProperties": false
        }
      ],
      "title": "AWSS3OutpostsBucketFilterAndOperatorDefinition"
    }
  },
  "createOnlyProperties": [
    "/properties/BucketName",
    "/properties/OutpostId"
  ],
  "readOnlyProperties": [
    "/properties/Arn"
  ]
}
