百度智能云

All Product Document

          Object Storage

          Get Access Log Configuration of Bucket

          Interface Description

          This interface is used to get the logging configuration of a bucket.

          Consideration

          If the requested source bucket does not exist, this interface returns “Error 404: NoSuchBucket”. It is allowed to view the error only when the requester is the source bucket owner with the FULL_CONTROL permission. Otherwise, the interface returns “Error 403: AccessDenied”.

          Request URI

          GET /v1/{bucketName}/?logging

          Parameter Name Parameter Type Required Description Example Value Parameter Position
          bucketName String Yes Bucket name "bucketName_example" Path

          Request Body Parameters

          Instructions for Data Structure of Request Body Field

          Response Body Parameters

          Instructions for Data Structure of Response Body Field

          Parameter name Parameter type Description Example value
          status String Enabling status of the logging feature of the bucket, whose value is enabled or disabled. “Enabled” indicates that the logging feature of the bucket is enabled and “Disabled” indicates that the logging feature of the bucket is not enabled. enabled
          targetBucket String Specify the logging storage bucket. If the logging feature is not enabled, there is no such field in the response. dscbucket
          targetPrefix String Specify the log file prefix saved finally. If the logging feature is not enabled, there is no such field in the response. mylog-

          Request Example

          GET /v1/bucketName_example/?logging
          Common Request Header
          
          
          { }

          Response Example

          HTTP/1.1 200 OK
          <Common response header>
          
          {
            "targetPrefix" : "mylog-",
            "targetBucket" : "dscbucket",
            "status" : "enabled"
          }

          Error Code

          Refer to the universal error code.

          Previous
          Disable Access Log Configuration of Bucket
          Next
          Enable Access Log of Bucket