全部產品
Search
文件中心

Object Storage Service:get-bucket-resource-group

更新時間:Aug 30, 2024

get-bucket-resource-group用於擷取儲存空間(Bucket)所屬的資源群組ID。

注意事項

阿里雲帳號預設擁有擷取Bucket所屬的資源群組ID的許可權。如果您需要通過RAM使用者或者STS的方式進行擷取,您必須擁有oss:GetBucketResourceGroup許可權。具體操作,請參見為RAM使用者授權自訂的權限原則

命令格式

ossutil api get-bucket-resource-group --bucket value [flags]
說明

使用樣本

  • 擷取儲存空間examplebucket所屬的資源群組ID。

    ossutil api get-bucket-resource-group --bucket examplebucket
  • 擷取儲存空間examplebucket所屬的資源群組ID,以JSON格式顯示。

    ossutil api get-bucket-resource-group --bucket examplebucket --output-format json
  • 擷取儲存空間examplebucket所屬的資源群組ID,以YAML格式顯示。

    ossutil api get-bucket-resource-group --bucket examplebucket --output-format yaml