get-bucket-replication-location介面用於擷取可複製到的目標儲存空間(Bucket)所在的地區。您可以根據返回結果決定將源Bucket的資料複製到哪個地區。
注意事項
要擷取儲存空間的資料複製所在地區,您必須有
oss:GetBucketReplicationLocation許可權。具體操作,請參見為RAM使用者授權自訂的權限原則。只有Bucket的擁有者才能擷取Bucket的資料複製規則。該請求可以從任何一個OSS的Endpoint發起。
命令格式
ossutil api get-bucket-replication-location --bucket value [flags]參數 | 類型 | 說明 |
--bucket | string | Bucket名稱。 |
說明
get-bucket-replication-location命令對應API介面GetBucketReplicationLocation。關於API中的具體參數含義,請參見GetBucketReplicationLocation。
關於支援的全域命令列選項,請參見支援的全域命令列選項。
使用樣本
擷取儲存空間examplebucket可複製到的目標儲存空間所在的地區。
ossutil api get-bucket-replication-location --bucket examplebucket擷取儲存空間examplebucket可複製到的目標儲存空間所在的地區,以JSON格式顯示。
ossutil api get-bucket-replication-location --bucket examplebucket --output-format json擷取儲存空間examplebucket可複製到的目標儲存空間所在的地區,以YAML格式顯示。
ossutil api get-bucket-replication-location --bucket examplebucket --output-format yaml