Comment on page
PutBucketLogging
PUT /{bucket}?logging HTTP/1.1
Parameter | Description |
---|---|
bucket | Name of the bucket. |
Parameter | Description |
---|---|
logging | Required parameter that indicates the type of operation. |
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>
Element | Description |
---|---|
BucketLoggingStatus | Root element. |
TargetBucket | The name of the target bucket where the objects are saved with logs.
Type: String. |
TargetPrefix | Object key prefix with logs.
Type: String. |
To disable logging of actions with the bucket:
<BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" />
A successful response does not contain any additional data.
Last modified 1yr ago