PUT service replication

Sets replication configuration for the specified bucket.

Requests

Syntax

PUT /?replication HTTP/1.1
Host: <bucket>.<host>
Date: <date>
Authorization: <authorization_string>

Parameters

ParameterDescription

bucket

Bucket name.

Type: string.

user_id

ID of the user that is used to replicate objects on your behalf.

Type: string.

The ID can always be taken from the Access Key by dropping the last 4 digits.

destination_bucket

The name of the bucket where you want to store the results.

Type: string.

<authorization_string>

Body

An XML replication configuration in the following format:

<?xml version="1.0" encoding="UTF-8"?>
<ReplicationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <Role>arn:aws:iam::<user_id>:role/s3-replication-role</Role>
   <Rule>
      <Status>Enabled|Disabled</Status>
      <Priority>1</Priority>
      <DeleteMarkerReplication>
         <Status>Enabled|Disabled</Status>
      </DeleteMarkerReplication>
      <Filter>
         <Prefix />
      </Filter>
      <Destination>
         <Bucket>arn:aws:s3:::<destination_bucket></Bucket>
      </Destination>
   </Rule>
</ReplicationConfiguration>

Headers

HeaderDescription

x-amz-geo-endpoint

Endpoint of the remote region where to replicate objects to. BIT1: os.bit1.cloudbit.ch ZRH1 (www.flow.swiss): os.zrh1.flow.swiss ALP1 (www.flow.swiss): os.alp1.flow.swiss

x-amz-geo-access-key

Access key of a user of the remote region used to replicate objects.

x-amz-geo-access-secret

Access secret of a user of the remote region used to replicate objects.

Responses

Headers

This implementation uses only common response headers.

Body

Empty.

Example

Sets replication configuration for the bucket. test.

PUT/?replication HTTP/1.1 
Host: test.os.bit1.cloudbit.ch 
Date: Tu, 13 Jan 2023 14:08:55 GMT 
Authorization: <authorization_string> 
x-amz-geo-endpoint: os.alp1.flow.swiss
x-amz-geo-access-key: <access_key> 
x-amz-geo-access-secret: <access-secret>

<ReplicationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> 
   <Role>arn:aws:iam::<user_id>:role/s3-replication-role</Role> 
   <Rule> 
      <Status>Enabled</Status> 
      <Priority>1</Priority> 
      <DeleteMarkerReplication> 
         <Status>Disabled</Status> 
      </DeleteMarkerReplication> 
      <Filter> 
         <Prefix /> 
      </Filter> 
      <Destination> 
         <Bucket>arn:aws:s3:::os.alp1.flow.swiss</Bucket> 
      </Destination> 
   </Rule> 
</ReplicationConfiguration>

Sample response

HTTP/1.1 200 OK
Transfer-encoding : chunked
Server : nginx/1.8.1
Connection: closed
x-amz-request-id : 80000000000000030005c8caec96d65b
Date : Tu, 21 Jan 2021 14:08:56 GMT

Last updated