Get Bucket Replication

Last updated:2021-04-28 11:04:20

Description

You can call this operation to query the cross-region replication rule of a source bucket and obtain the result in XML format.

Permission

To call this operation, you must have the GETBucketReplication permission on the bucket.

Request

Request syntax

GET /?crr HTTP/1.1
Host: {BucketName}.{endpoint}
Date: {date}
Authorization: {SignatureValue}  

Request parameters

This operation does not involve request parameters.

Request headers

This operation involves only common request headers. For more information, see Public Request Header.

Request body

This operation does not involve request body.

Response

Response headers

This operation involves only common response headers. For more information, see Public Response Header.

Response body

This operation returns a response in XML format, which may contain the following parameters.

Parameter Description Required
Replication The container of the cross-region replication rule. You can configure only one rule for one source bucket.
Type: Container
Child node: none
Parent node: none
Yes
prefix The prefix for matching objects. Only the objects matching the prefix are replicated. You can add up to five prefixes for a cross-region replication rule, and the prefixes must be unique.
Type: String
Parent node: Replication
No
DeleteMarkerStatus Indicates whether deletion replication is enabled. If this parameter is set to Enabled, deletion replication is enabled. When an object is deleted from the source bucket, the object replica in the destination bucket is also deleted. If this parameter is set to Disabled or is unspecified, deletion replication is disabled.
Type: String
Parent node: Replication
No
targetBucket The destination bucket for cross-region replication.
Type: String
Parent node: Replication
Yes

Operation-specific errors

Error code Description HTTP status code
NoSuchBucketReplicationConfiguration No cross-region replication rule is configured for the bucket. 404 Not Found

Examples

Sample request

GET /?crr HTTP/1.1
Host: ks3-example.ks3-cn-beijing.ksyun.com
Date: Wed, 14 May 2014 02:11:21 GMT
Content-MD5: xxx 
Authorization: authorization string
Content-Length: yyy
Content-type: application/xml

In this example, a cross-region replication rule is configured for a bucket, two prefixes abc and xyz are configured for the cross-region replication rule, deletion replication is enabled, and the destination bucket is targetbucket.

Sample response

HTTP/1.1 200 OK  
Content-Length: 0  
Date: Tue, 19 Jul 2017 09:14:23 GMT  
Server: Tengine  
x-kss-request-id: 6af24440694b4d00b8de063ccbe86336  
<Replication xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> 
	<prefix>abc</prefix>  
	<prefix>xyz</prefix>   
	<DeleteMarkerStatus>Enabled</DeleteMarkerStatus>   
	<targetBucket>bucketname</targetBucket>  
</Replication>

Did you find the above information helpful?

Unhelpful
Mostly Unhelpful
A little helpful
Helpful
Very helpful

What might be the problems?

Insufficient
Outdated
Unclear or awkward
Redundant or clumsy
Lack of context for the complex system or functionality

More suggestions

0/200

Please give us your feedback.

Submitted

Thank you for your feedback.

问题反馈