Queries the region of the destination bucket to which the data in the source bucket can be replicated. Use the response to determine which region to target when setting up a replication rule.
Prerequisites
Before you begin, ensure that you have:
The
oss:GetBucketReplicationLocationpermission. For setup instructions, see Attach a custom policy to a RAM userBucket owner access — only the bucket owner can query replication information for a bucket
You can initiate a get-bucket-replication-location request from an OSS endpoint.
Command syntax
ossutil api get-bucket-replication-location --bucket <value> [flags]| Parameter | Type | Required | Description |
|---|---|---|---|
--bucket | string | Yes | The name of the source bucket. |
This command maps to the GetBucketReplicationLocation API operation. For the full parameter reference, see GetBucketReplicationLocation. For all supported global flags, see Global command-line options.Examples
Query the available destination regions for `examplebucket`:
ossutil api get-bucket-replication-location --bucket examplebucketGet the response in JSON format:
ossutil api get-bucket-replication-location --bucket examplebucket --output-format jsonGet the response in YAML format:
ossutil api get-bucket-replication-location --bucket examplebucket --output-format yaml