PutBucketLogging

Enables and disables the mechanism for logging actions with the bucket.

Request

PUT /{bucket}?logging HTTP/1.1

Path parameters

Query parameters

Data schema

To enable logging of actions with the bucket:

<?xml version="1.0" encoding="UTF-8" ?>
<BucketLoggingStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <LoggingEnabled>
      <TargetBucket>bucket-logs</TargetBucket>
      <TargetPrefix>logs/</TargetPrefix>
   </LoggingEnabled>
</BucketLoggingStatus>

To disable logging of actions with the bucket:

<BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" />

Headers

Use only common request headers in requests.

Response

Headers

Responses can only contain common response headers.

Response codes

For a list of possible responses, see Responses.

A successful response does not contain any additional data.

Last updated