SetBucketLoggingStatus (SOAP API) - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

SetBucketLoggingStatus (SOAP API)

Note

SOAP support over HTTP is deprecated, but it is still available over HTTPS. New Amazon S3 features will not be supported for SOAP. We recommend that you use either the REST API or the Amazon SDKs.

The SetBucketLoggingStatus operation updates the logging status for an existing bucket.

For a general introduction to this feature, see Server Logs.

Example

This sample request enables server access logging for the 'mybucket' bucket, and configures the logs to be delivered to 'mylogs' under prefix 'access_log-'

Sample Request

<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <SetBucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01"> <Bucket>myBucket</Bucket> <AWSAccessKeyId>YOUR_AWS_ACCESS_KEY_ID</AWSAccessKeyId> <Timestamp>2006-03-01T12:00:00.183Z</Timestamp> <Signature>YOUR_SIGNATURE_HERE</Signature> <BucketLoggingStatus> <LoggingEnabled> <TargetBucket>mylogs</TargetBucket> <TargetPrefix>mybucket-access_log-</TargetPrefix> </LoggingEnabled> </BucketLoggingStatus> </SetBucketLoggingStatus> </soap:Body> :</soap:Envelope>

Sample Response

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <soapenv:Header> </soapenv:Header> <soapenv:Body> <SetBucketLoggingStatusResponse xmlns="http://s3.amazonaws.com/doc/2006-03-01"/> </soapenv:Body> </soapenv:Envelope>

Access Control

Only the owner of a bucket is permitted to invoke this operation.