全部產品
Search
文件中心

Object Storage Service:get-bucket-logging

更新時間:Dec 27, 2024

get-bucket-logging介面用於查看某個儲存空間(Bucket)中的訪問日誌配置。

注意事項

阿里雲帳號預設擁有查看Bucket的訪問日誌配置的許可權。如果您需要通過RAM使用者或者STS的方式進行查看,您必須擁有oss:GetBucketLogging許可權。具體操作,請參見為RAM使用者授權自訂的權限原則

命令格式

ossutil api get-bucket-logging --bucket value [flags]

參數

類型

說明

--bucket

string

Bucket的名稱。

說明

使用樣本

  • 查看儲存空間examplebucket的訪問日誌配置。

    ossutil api get-bucket-logging --bucket examplebucket
  • 查看儲存空間examplebucket的訪問日誌配置,以JSON格式顯示。

    ossutil api get-bucket-logging --bucket examplebucket --output-format json
  • 查看儲存空間examplebucket的訪問日誌配置,以YAML格式顯示。

    ossutil api get-bucket-logging --bucket examplebucket --output-format yaml