{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-s3/json-schema/amazon-s3-put-bucket-replication-request-schema.json",
  "title": "PutBucketReplicationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-s3-replication-api-openapi.yml#/components/schemas/PutBucketReplicationRequest",
  "type": "object",
  "properties": {
    "Bucket": {
      "type": "string",
      "description": "The name of the bucket"
    },
    "ContentMD5": {
      "type": "string",
      "description": "The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864. For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically."
    },
    "ChecksumAlgorithm": {
      "type": "string",
      "enum": [
        "CRC32",
        "CRC32C",
        "SHA1",
        "SHA256",
        "CRC64NVME",
        "SHA512",
        "MD5",
        "XXHASH64",
        "XXHASH3",
        "XXHASH128"
      ],
      "description": "Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more information, see Checking object integrity in the Amazon S3 User Guide. If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter."
    },
    "ReplicationConfiguration": {
      "$ref": "#/$defs/ReplicationConfiguration"
    },
    "Token": {
      "type": "string",
      "description": "A token to allow Object Lock to be enabled for an existing bucket."
    },
    "ExpectedBucketOwner": {
      "type": "string",
      "description": "The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied)."
    }
  },
  "required": [
    "Bucket",
    "ReplicationConfiguration"
  ],
  "$defs": {
    "AccessControlTranslation": {
      "type": "object",
      "properties": {
        "Owner": {
          "type": "string",
          "enum": [
            "Destination"
          ],
          "description": "Specifies the replica ownership. For default and valid values, see PUT bucket replication in the Amazon S3 API Reference."
        }
      },
      "required": [
        "Owner"
      ]
    },
    "DeleteMarkerReplication": {
      "type": "object",
      "properties": {
        "Status": {
          "type": "string",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "description": "Indicates whether to replicate delete markers. Indicates whether to replicate delete markers."
        }
      }
    },
    "Destination": {
      "type": "object",
      "properties": {
        "Bucket": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the results."
        },
        "Account": {
          "type": "string",
          "description": "Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to change replica ownership to the Amazon Web Services account that owns the destination bucket by specifying the AccessControlTranslation property, this is the account ID of the destination bucket owner. For more information, see Replication Additional Configuration: Changing the Replica Owner in the Amazon S3 User Guide."
        },
        "StorageClass": {
          "type": "string",
          "enum": [
            "STANDARD",
            "REDUCED_REDUNDANCY",
            "STANDARD_IA",
            "ONEZONE_IA",
            "INTELLIGENT_TIERING",
            "GLACIER",
            "DEEP_ARCHIVE",
            "OUTPOSTS",
            "GLACIER_IR",
            "SNOW",
            "EXPRESS_ONEZONE",
            "FSX_OPENZFS",
            "FSX_ONTAP",
            "AWS_BACKUP_WARM",
            "AWS_BACKUP_LOW_COST_WARM"
          ],
          "description": "The storage class to use when replicating objects, such as S3 Standard or reduced redundancy. By default, Amazon S3 uses the storage class of the source object to create the object replica. For valid values, see the StorageClass element of the PUT Bucket replication action in the Amazon S3 API Reference. FSX_OPENZFS is not an accepted value when replicating objects."
        },
        "AccessControlTranslation": {
          "$ref": "#/$defs/AccessControlTranslation"
        },
        "EncryptionConfiguration": {
          "$ref": "#/$defs/EncryptionConfiguration"
        },
        "ReplicationTime": {
          "$ref": "#/$defs/ReplicationTime"
        },
        "Metrics": {
          "$ref": "#/$defs/Metrics"
        }
      },
      "required": [
        "Bucket"
      ]
    },
    "EncryptionConfiguration": {
      "type": "object",
      "properties": {
        "ReplicaKmsKeyID": {
          "type": "string",
          "description": "Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide."
        }
      }
    },
    "ExistingObjectReplication": {
      "type": "object",
      "properties": {
        "Status": {
          "type": "string",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "description": "Specifies whether Amazon S3 replicates existing source bucket objects."
        }
      },
      "required": [
        "Status"
      ]
    },
    "Metrics": {
      "type": "object",
      "properties": {
        "Status": {
          "type": "string",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "description": "Specifies whether the replication metrics are enabled."
        },
        "EventThreshold": {
          "$ref": "#/$defs/ReplicationTimeValue"
        }
      },
      "required": [
        "Status"
      ]
    },
    "ReplicaModifications": {
      "type": "object",
      "properties": {
        "Status": {
          "type": "string",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "description": "Specifies whether Amazon S3 replicates modifications on replicas."
        }
      },
      "required": [
        "Status"
      ]
    },
    "ReplicationConfiguration": {
      "type": "object",
      "properties": {
        "Role": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when replicating objects. For more information, see How to Set Up Replication in the Amazon S3 User Guide."
        },
        "Rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReplicationRule"
          },
          "description": "A container for one or more replication rules. A replication configuration must have at least one rule and can contain a maximum of 1,000 rules."
        }
      },
      "required": [
        "Role",
        "Rules"
      ]
    },
    "ReplicationRule": {
      "type": "object",
      "properties": {
        "ID": {
          "type": "string",
          "description": "A unique identifier for the rule. The maximum value is 255 characters."
        },
        "Priority": {
          "type": "integer",
          "description": "The priority indicates which rule has precedence whenever two or more replication rules conflict. Amazon S3 will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority. For more information, see Replication in the Amazon S3 User Guide."
        },
        "Prefix": {
          "type": "string",
          "description": "An object key name prefix that identifies the object or objects to which the rule applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, specify an empty string. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints."
        },
        "Filter": {
          "$ref": "#/$defs/ReplicationRuleFilter"
        },
        "Status": {
          "type": "string",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "description": "Specifies whether the rule is enabled."
        },
        "SourceSelectionCriteria": {
          "$ref": "#/$defs/SourceSelectionCriteria"
        },
        "ExistingObjectReplication": {
          "$ref": "#/$defs/ExistingObjectReplication"
        },
        "Destination": {
          "$ref": "#/$defs/Destination"
        },
        "DeleteMarkerReplication": {
          "$ref": "#/$defs/DeleteMarkerReplication"
        }
      },
      "required": [
        "Status",
        "Destination"
      ]
    },
    "ReplicationRuleAndOperator": {
      "type": "object",
      "properties": {
        "Prefix": {
          "type": "string",
          "description": "An object key name prefix that identifies the subset of objects to which the rule applies."
        },
        "Tags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Tag"
          },
          "description": "An array of tags containing key and value pairs."
        }
      }
    },
    "ReplicationRuleFilter": {
      "type": "object",
      "properties": {
        "Prefix": {
          "type": "string",
          "description": "An object key name prefix that identifies the subset of objects to which the rule applies. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints."
        },
        "Tag": {
          "$ref": "#/$defs/Tag"
        },
        "And": {
          "$ref": "#/$defs/ReplicationRuleAndOperator"
        }
      }
    },
    "ReplicationTime": {
      "type": "object",
      "properties": {
        "Status": {
          "type": "string",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "description": "Specifies whether the replication time is enabled."
        },
        "Time": {
          "$ref": "#/$defs/ReplicationTimeValue"
        }
      },
      "required": [
        "Status",
        "Time"
      ]
    },
    "ReplicationTimeValue": {
      "type": "object",
      "properties": {
        "Minutes": {
          "type": "integer",
          "description": "Contains an integer specifying time in minutes. Valid value: 15"
        }
      }
    },
    "SourceSelectionCriteria": {
      "type": "object",
      "properties": {
        "SseKmsEncryptedObjects": {
          "$ref": "#/$defs/SseKmsEncryptedObjects"
        },
        "ReplicaModifications": {
          "$ref": "#/$defs/ReplicaModifications"
        }
      }
    },
    "SseKmsEncryptedObjects": {
      "type": "object",
      "properties": {
        "Status": {
          "type": "string",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "description": "Specifies whether Amazon S3 replicates objects created with server-side encryption using an Amazon Web Services KMS key stored in Amazon Web Services Key Management Service."
        }
      },
      "required": [
        "Status"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "Name of the object key."
        },
        "Value": {
          "type": "string",
          "description": "Value of the tag."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}