Object Storage API, Amazon S3-compatible REST: GetBucketLogging
Returns the settings for bucket logging.
For more information on getting started with the API and the general request format, see How to use the S3 API.
Request
GET /{bucket}?logging HTTP/2
Path parameters
|
Parameter |
Description |
|
|
Bucket name |
Query parameters
|
Parameter |
Description |
|
|
Required parameter that indicates the type of operation |
Headings
Use common headers in your requests.
Response
Headers
Responses can only contain common headers.
Response codes
For a list of possible responses, see Responses.
A successful response contains additional data in XML format with the schema described below.
Data schema
Response if bucket logging is not configured:
<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<!--<LoggingEnabled><TargetBucket>bucket-logs</TargetBucket><TargetPrefix>add/this/prefix/to/my/log/files/access_log-</TargetPrefix></LoggingEnabled>-->
</BucketLoggingStatus>
Response if bucket logging is configured:
<?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 |
|
|
Root element. |
|
|
Name of the target bucket where objects with logs are saved. Path: |
|
|
Path: |