全部產品
Search
文件中心

Object Storage Service:get-bucket-replication-location

更新時間:Aug 30, 2024

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名稱。

說明

使用樣本

  • 擷取儲存空間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