Queries the region of the destination bucket to which the data in the source bucket can be replicated. You can determine the region of the destination bucket to which the data in the source bucket is replicated based on the response.
Usage notes
To query the region of the destination bucket to which the data in the source bucket can be replicated, you must have the
oss:GetBucketReplicationLocation
permission. For more information, see Attach a custom policy to a RAM user.Only the bucket owner can query the data replication rules of the 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 | Description |
--bucket | string | The name of the bucket. |
The get-bucket-replication-location command corresponds to the GetBucketReplicationLocation operation. For more information about the parameters in the GetBucketReplicationLocation operation, see GetBucketReplicationLocation.
For more information about supported global command-line options, see Global command-line options.
Examples
Run the following command to query the region of the destination bucket to which the data in a source bucket named examplebucket can be replicated:
ossutil api get-bucket-replication-location --bucket examplebucket
Run the following command to query the region of the destination bucket to which the data in a source bucket named examplebucket can be replicated and display the query results in the JSON format:
ossutil api get-bucket-replication-location --bucket examplebucket --output-format json
Run the following command to query the region of the destination bucket to which the data in a source bucket named examplebucket can be replicated and display the query results in the YAML format:
ossutil api get-bucket-replication-location --bucket examplebucket --output-format yaml