Queries the regions where the destination bucket of a data replication rule can be located.
Request structure
GET /?replicationLocation HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
Response elements
|
Element |
Type |
Description |
|
ReplicationLocation |
Container |
Container for destination bucket regions. |
|
Location |
String |
Region where the destination bucket can be located. Example: oss-cn-beijing. Parent node: ReplicationLocation Child nodes: none Note
If multiple regions are available, the response contains multiple Location elements. If no region is available, the value is null. |
|
LocationTransferTypeConstraint |
Container |
Container for destination bucket regions with TransferType specified. |
|
LocationTransferType |
Container |
Container for a destination bucket region with TransferType information. |
|
TransferTypes |
Container |
Container for the transfer type. |
|
Type |
String |
The data transfer link for replication. Default value: internal. Valid values:
|
Examples
-
Sample requests
GET /?replicationLocation 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 responses
NoteThe response includes the TransferType element only when TransferType is set to oss_acc.
HTTP/1.1 200 OK
x-oss-request-id: 534B371674E88A4D8906****
Date: Thu, 24 Sep 2015 15:39:15 GMT
Content-Length: 84
Content-Type: application/xml
Connection: close
Server: AliyunOSS
<?xml version="1.0" ?>
<ReplicationLocation>
<Location>oss-cn-beijing</Location>
<Location>oss-cn-qingdao</Location>
<Location>oss-cn-shenzhen</Location>
<Location>oss-cn-hongkong</Location>
<Location>oss-us-west-1</Location>
<LocationTransferTypeConstraint>
<LocationTransferType>
<Location>oss-cn-hongkong</Location>
<TransferTypes>
<Type>oss_acc</Type>
</TransferTypes>
</LocationTransferType>
<LocationTransferType>
<Location>oss-us-west-1</Location>
<TransferTypes>
<Type>oss_acc</Type>
</TransferTypes>
</LocationTransferType>
</LocationTransferTypeConstraint>
</ReplicationLocation>
OSS SDKs
Call GetBucketReplicationLocation with the following OSS SDKs:
ossutil
For information about the ossutil command that corresponds to the GetBucketReplicationLocation operation, see get-bucket-replication-location.
Error codes
|
Error code |
HTTP status code |
Description |
|
NoSuchBucket |
404 NotFound |
The specified bucket does not exist. |