• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Buckets
  5. GET Bucket logging
  6. Responses

Responses

Syntax

HTTP/1.1 status_code 
 Server: Server Name
 x-amz-request-id: request id
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
 x-amz-id-2: id
 Content-Type: type
 Date: date
 Content-Length:length

 <?xml version="1.0" encoding="UTF-8"?> 
 <BucketLoggingStatus xmlns="http://obs.example.com/doc/2006-03-01/">
 <LoggingEnabled> 
 <TargetBucket>bucketName</TargetBucket> 
 <TargetPrefix>prefix</TargetPrefix> 
 <TargetGrants> 
 <Grant> 
 <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"> 
 <ID>id</ID> 
 <DisplayName>displayName</DisplayName> 
 </Grantee> 
 <Permission>permission</Permission> 
 </Grant> 
 </TargetGrants> 
 </LoggingEnabled> 
 </BucketLoggingStatus>

Response Headers

This response uses common headers. For details about common response headers, see section Common Response Headers.

Response Elements

This response contains elements to specify the bucket logging status. Table 1 describes the elements.

Table 1 Response elements

Element

Description

Remarks

BucketLoggingStatus

Indicates the container for logging status information.

Type: Container

Mandatory

LoggingEnabled

Indicates the container for logging information. This element is present when you are enabling logging (and not present when you are disabling logging).

Type: Container

Optional

Grant

Indicates the container for the grantee and the grantee's logging permission.

Type: Container

Optional

Grantee

Indicates the container for users granted logging permission.

Type: Container

Optional

ID

DomainId of the grantee, Indicates the globally unique ID.

Type: String

Optional

DisplayName

Indicates the name of the grantee. This element is not globally unique but a user ID corresponds to only one name.

Type: String

Optional

Permission

Indicates the logging permission granted to the grantee for a bucket. The bucket owner is automatically granted the FULL_CONTROL permission when creating the bucket. Logging permission control access to different logs.

Type: String

Valid Values: FULL_CONTROL | READ | WRITE

Optional

TargetBucket

Specifies the target bucket where bucket logs are stored. In OBS, logs of multiple buckets can be stored in the same target bucket. In this case, you need to use different TargetPrefix to distinguish the logs.

Type: String

Optional

TargetPrefix

Specifies a prefix for keys of logs to be stored.

Type: String

Optional

TargetGrants

Indicates the container for granting information.

Type: Container

Optional

Error Responses

No special error responses are returned. For details about error responses, see Table 1.