Help Center/ Object Storage Service/ API Reference/ APIs/ Advanced Bucket Settings/ Obtaining the Cross-Region Replication Configuration of a Bucket
Updated on 2025-08-22 GMT+08:00

Obtaining the Cross-Region Replication Configuration of a Bucket

Functions

This operation obtains the replication configuration information of a specified bucket. To perform this operation, you must have the GetReplicationConfiguration permission.

Request Syntax

1
2
3
4
GET /?replication HTTP/1.1 
Host: bucketname.obs.region.myhuaweicloud.com 
Date: date 
Authorization:authorization string

Request Parameters

This request contains no message parameters.

Request Headers

This request uses common headers. For details, see Table 3.

Request Elements

This request involves no elements.

Response Syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
HTTP/1.1 status_code 
Date: date 
Server:OBS 
Content-Length: contentlength 

<?xml version="1.0" encoding="UTF-8"?> 
<ReplicationConfiguration xmlns="http://obs.ap-southeast-1.myhuaweicloud.com/doc/2006-03-01/">
 
  <Agency>testAcy</Agency>
  <Rule> 
      <ID>rule1</ID> 
      <Status>Enabled</Status> 
      <Prefix></Prefix> 
      <Destination> 
         <Bucket>exampletargetbucket</Bucket> 
         <StorageClass>WARM</StorageClass> 
         <DeleteData>Enabled</DeleteData>
      </Destination> 
      <HistoricalObjectReplication>Enabled</HistoricalObjectReplication>
  </Rule> 
</ReplicationConfiguration>

Response Headers

The response to the request uses common headers. For details, see Table 1.

Response Elements

This response contains elements to detail the configuration. The following table describes the elements.

Table 1 Elements for obtaining bucket replication configuration

Parameter

Type

Description

ReplicationConfiguration

Container

Definition:

Container of cross-region replication rules. ReplicationConfiguration is the parent node of Rule and Agency.

Range:

None

Rule

Container

Definition:

Container of a specified cross-region replication rule.

Range:

For details, see Table 2.

Agency

String

Definition:

Name of the agency created by the user.

Range:

The value is a string of 0 to 64 characters.

Table 2 Rule parameter description

Parameter

Type

Description

ID

String

Definition:

ID of the cross-region replication rule.

Range:

The value is a string of 0 to 255 characters.

Status

String

Definition:

Whether to enable the cross-region replication rule.

Range:

  • Enabled: The rule is enabled.
  • Disabled: The rule is disabled.

Prefix

String

Definition:

Prefix of an object name.

Range:

The value is a UTF-8-encoded character sequence containing 1 to 1024 characters. The prefix characters of different rules cannot overlap. For example, two rules are configured, the prefix of rule 1 is object, and the prefix of rule 2 is obj. Both prefixes contain obj.

Destination

Container

Definition:

Container for the destination bucket information.

Range:

For details, see Table 3.

HistoricalObjectReplication

String

Definition:

Whether to replicate historical objects that meet the cross-region replication rule.

Range:

  • Enabled: Replicate historical objects that meet the cross-region replication rule.
  • Disabled: Historical objects that meet the cross-region replication rule are not replicated.
Table 3 Destination parameters

Parameter

Type

Description

Bucket

String

Definition:

Bucket used to store object copies that are marked by rules.

Range:

The value can contain 3 to 63 characters.

StorageClass

String

Definition:

The storage class to which objects replicated to the destination bucket will be changed.

Range:

  • STANDARD: Standard storage
  • WARM: Infrequent Access storage
  • COLD: Archive storage
  • DEEP_ARCHIVE: Deep Archive storage (limited OBT)

DeleteData

String

Definition:

Whether to synchronously delete objects with the same names in the destination bucket through cross-region replication after the objects in the source bucket are deleted.

Range:

  • Enabled: The deletion of objects in the source bucket will be synchronized to the destination bucket.
  • Disabled: The deletion of objects in the source bucket will not be synchronized to the destination bucket.

Error Responses

The following table describes the error response for this request.

Table 4 Error response elements

Error Code

Description

HTTP Response Code

SOAP Error Code Prefix

NoSuchReplicationConfiguration

Cross-region replication configuration does not exist.

404 not found

Client

Sample Request

1
2
3
4
5
6
GET /?replication HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.myhuaweicloud.com
Accept: */*
Date: Wed, 27 Jun 2018 13:42:40 +0000
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:jGHviInfRyOkT/EpySpua1hlBuY=

Sample Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: B59500000164417B57D02F7EF8823152
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSHu6lz4vgk5G3E32OFcIPEZZgdOEYE/
Content-Type: application/xml
Date: Wed, 27 Jun 2018 13:42:39 GMT
Content-Length: 337

<?xml version="1.0" encoding="utf-8"?>
<ReplicationConfiguration xmlns="http://obs.ap-southeast-1.myhuaweicloud.com/doc/2006-03-01/">
 
  <Rule> 
    <ID>Rule-1</ID>  
    <Status>Enabled</Status>  
    <Prefix></Prefix>  
    <Destination> 
      <Bucket>dstbucket</Bucket>  
      <StorageClass>STANDARD</StorageClass> 
      <DeleteData>Enabled</DeleteData>
    </Destination>
    <HistoricalObjectReplication>Enabled</HistoricalObjectReplication> 
  </Rule>  
  <Agency>testAcy</Agency> 
</ReplicationConfiguration>