All Products
Search
Document Center

Object Storage Service:GetBucketReplication

Last Updated:Mar 27, 2026

Queries the data replication rules configured for a bucket.

Request syntax

GET /?replication HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com 
Date: GMT Date
Authorization: SignatureValue

Response elements

Name

Type

Example

Description

ReplicationConfiguration

Container

N/A

The container for the bucket replication rules.

Parent node: None

Child node: Rule

Rule

Container

N/A

The container for replication rules.

Parent node: ReplicationConfiguration

Child node: Destination, HistoricalObjectReplication, Status, ID, and UserTaggings

ID

String

test_replication_1

The ID of the replication rule.

Parent node: Rule

Child node: None

PrefixSet

Container

N/A

The container for prefixes. Up to 10 prefixes can be specified in each replication rule.

Parent node: Rule

Child node: Prefix

Prefix

String

source1

The prefix of objects replicated to the destination bucket.

Parent node: PrefixSet

Child node: None

Action

String

PUT

The operations that are replicated to the destination bucket.

Action supports the following operation types. You can specify one or more types.

  • ALL (default): PUT, DELETE, and ABORT operations are replicated to the destination bucket.

  • PUT: Write operations are replicated to the destination bucket, including PutObject, PostObject, AppendObject, CopyObject, PutObjectACL, InitiateMultipartUpload, UploadPart, UploadPartCopy, and CompleteMultipartUpload.

Parent node: Rule

Child node: None

Status

String

doing

The replication status.

Valid values:

  • starting: After a replication rule is configured, OSS prepares the replication tasks. The replication status is starting during this phase.

  • doing: The replication rule is in effect and data is being replicated.

  • closing: After a replication rule is deleted, OSS performs cleanup. The replication status is closing during this phase.

Parent node: Rule

Child node: None

Destination

Container

N/A

The container for destination bucket information.

Parent node: Rule

Child node: Bucket and Location

Bucket

String

destbucket

The destination bucket to which data is replicated.

Parent node: Destination

Child node: None

Location

String

oss-cn-beijing

The region in which the destination bucket is located.

Parent node: Destination

Child node: None

TransferType

String

oss_acc

The data transfer type used for replication. This element is included in the response only when the transfer type is oss_acc.

Valid values:

  • internal (default): The standard OSS transfer link.

  • oss_acc: The transfer acceleration link. Transfer acceleration links are available only for cross-region replication (CRR) rules.

HistoricalObjectReplication

String

disabled

Specifies whether historical data is replicated. Historical data refers to objects that exist in the source bucket before the replication rule takes effect.

Valid values:

  • enabled (default): Historical data is replicated to the destination bucket.

  • disabled: Historical data is not replicated. Only data written after the replication rule takes effect is replicated.

Parent node: Rule

Child node: None

SyncRole

String

aliyunramrole

The role used for cross-region replication. This element is included in the response only when SSE-KMS encrypted objects are replicated.

RTC

Container

N/A

The container for the Replication Time Control (RTC) status.

Parent node: Rule

Child node: Status

Status

String

enbaled

The RTC status. This element is included in the response only when the RTC status is enabling or enabled.

Valid values:

  • enabling: RTC is being enabled.

  • enabled: RTC is enabled.

  • disabled (default): RTC is disabled.

Parent node: RTC

Child node: None

UserTaggings

Container

N/A

The container for tag-based filter rules. This element is included in the response only when tag-based filter rules are configured.

Parent node: Rule

Child node: FilterType, UserTagging

FilterType

String

OR

The tag filtering policy. Case-sensitive. Valid values:

  • AND: Replicates only objects whose tags match all tags specified in the filter rules.

  • OR: Replicates objects whose tags match any tag specified in the filter rules.

Parent node: UserTaggings

Child node: None

UserTagging

Container

N/A

The container for a single tag key-value pair. Up to 10 tags can be specified.

Parent node: UserTaggings

Child node: Key, Value

Key

String

key1

The tag key. Maximum length: 128 characters. Case-sensitive. Valid characters: letters, digits, spaces, and the following special characters: +‑=._:/

Parent node: UserTagging

Child node: None

Value

String

value1

The tag value. Maximum length: 256 characters. Case-sensitive. Valid characters: letters, digits, spaces, and the following special characters: +‑=._:/

Parent node: UserTagging

Child node: None

Examples

  • Sample request

GET /?replication HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com 
Date: Thu, 24 Sep 2015 15:39:15 GMT
Authorization: OSS qn6q**************:77Dv****************
  • Sample response

HTTP/1.1 200 OK
x-oss-request-id: 534B371674E88A4D8906**** 
Date: Thu, 24 Sep 2015 15:39:15 GMT
Content-Length: 186
Content-Type: application/xml 
Connection: close
Server: AliyunOSS
<?xml version="1.0" ?>
<ReplicationConfiguration>
  <Rule>
    <ID>test_replication_1</ID>
    <PrefixSet>
      <Prefix>source1</Prefix>
      <Prefix>video</Prefix>
    </PrefixSet>
    <UserTaggings>
      <FilterType>OR</FilterType>
      <UserTagging>
        <Key>key1</Key>
        <Value>value1</Value>
      </UserTagging>
      <UserTagging>
        <Key>key2</Key>
        <Value>value2</Value>
      </UserTagging>
    </UserTaggings>
    <Action>PUT</Action>
    <Destination>
      <Bucket>destbucket</Bucket>
      <Location>oss-cn-beijing</Location>
      <TransferType>oss_acc</TransferType>
    </Destination>
    <Status>doing</Status>
    <HistoricalObjectReplication>enabled</HistoricalObjectReplication>
    <SyncRole>aliyunramrole</SyncRole>
    <RTC>
      <Status>enabled</Status>
    </RTC>
  </Rule>
</ReplicationConfiguration>

SDK

The following SDKs are available for this operation:

Command-line tool ossutil

For the ossutil command that corresponds to the GetBucketReplication operation, see get-bucket-replication.

Error codes

Error code

HTTP status code

Description

NoSuchBucket

404 NotFound

The specified bucket does not exist.

NoSuchReplicationConfiguration

404 NotFound

No data replication rules are configured for the specified bucket.