get-bucket-replication
Queries the data replication rules of a bucket. Object Storage Service (OSS) supports cross-region replication (CRR) and same-region replication (SRR).
Usage notes
-
To query the data replication rules of a bucket, you must have the
oss:GetBucketReplicationpermission. 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 GetBucketReplication request from an OSS endpoint.
Command syntax
ossutil api get-bucket-replication --bucket value [flags]
|
Parameter |
Type |
Description |
|
--bucket |
string |
The name of the bucket whose data replication rules you want to query. |
-
The get-bucket-replication command calls the GetBucketReplication operation to query data replication rules. For more information about the parameters in the GetBucketReplication operation, see GetBucketReplication.
-
For more information about supported global command-line options, see Command-line options.
Examples
-
Query the data replication rules of the examplebucket bucket:
ossutil api get-bucket-replication --bucket examplebucket -
Query the data replication rules of the examplebucket bucket and display the data replication rules in the JSON format:
ossutil api get-bucket-replication --bucket examplebucket --output-format json -
Query the data replication rules of the examplebucket bucket and display the data replication rules in the YAML format:
ossutil api get-bucket-replication --bucket examplebucket --output-format yaml