• Object Storage Service

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

Requests

Syntax

PUT /?logging HTTP/1.1 
 User-Agent: agent
 Host: bucketname.obs.example.com
 Accept: */*
 Date: date 
 Authorization: signatureValue

logging configuration

Request Parameters

This request involves no parameters.

Request Headers

This request uses common headers. For details about common request headers, see section Common Request Headers.

Request Elements

Table 1 Request 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). You can add specific logging information in this element.

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. You can only have your logs delivered to any bucket that you own. User groups that deliver logs to the target bucket must have the WRITE and READ_ACP permission. 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

Mandatory

TargetPrefix

Specifies a prefix for keys of logs to be stored.

Type: String

Mandatory

TargetGrants

Indicates the container for granting information.

Type: Container

Optional