Configuration structure
The REST API of Exoscale’s SOS allows you to configure the bucket replication configuration using XML. The Exoscale Portal or the Exoscale CLI offer a convenience mechanism to define it in the JSON format.
A replication configuration is composed of the unique identifier (uuid) of an Exoscale IAM role, and one or more rules. The replication will assume this IAM role to perform operations on your behalf, on both the source and destination buckets. For example:
<ReplicationConfiguration>
<Role>role-uuid</Role>
<Rule> ... </Rule>
<Rule> ... </Rule>
...
</ReplicationConfiguration>
The IAM role must have the following permissions:
get-object
on the source bucketput-object
,put-object-*
on the destination bucket
Rule configuration
Each rule will be configured with the following format:
ID
: a unique namePriority
: integer used to identifify the precedence between conflicting rules with the same destination bucket. The highest priority will win.Status
:Enabled
orDisabled
, to disable or enable a given rule while keeping the configurationFilter
: section to filter the elements to be replicatedPrefix
: ensures the rule applies only to objects matching the configured prefix
DeleteMarkerReplication
: section to configure replication of delete markersStatus
:Enabled
orDisabled
: to disable or enable the replication of delete markers
Destination
: section to configure the destination of the ruleBucket
: Target bucket name
You can use the following minimal configuration as an example:
<Rule>
<ID>My-Rule-0</ID>
<Priority>0</Priority>
<Status>Enabled</Status>
<Filter>
<Prefix></Prefix>
</Filter>
<DeleteMarkerReplication>
<Status>Enabled</Status>
</DeleteMarkerReplication>
<Destination>
<Bucket>my-exo-destination-bucket</Bucket>
</Destination>
</Rule>