GET Bucket logging
Note | |
---|---|
Logging functionality is currently in beta. |
Description
This implementation of the GET
operation uses the logging
sub-resource to return the logging status of a bucket and the
permissions users have to view and modify that status. To use GET
, you must
be the bucket owner.
Requests
Syntax
GET /?logging HTTP/1.1 Host:BucketName
.s3.amazonaws.com Date:date
Authorization:signature
Request Parameters
This implementation of the operation does not use request parameters.
Request Headers
This implementation of the operation only uses request headers common to all operations. For more information, see
Request Elements
This implementation of the operation does not use request elements.
Responses
Response Headers
This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.
Response Elements
Name | Description |
---|---|
BucketLoggingStatus
|
Container for the response. Type: Container Ancestry: None |
EmailAddress
|
E-mail address of the person whose logging permissions are displayed. Type: String Ancestry: BucketLoggingStatus.LoggingEnabled.TargetGrants.Grant.Grantee |
Grant
|
Container for Type: Container Ancestry: BucketLoggingStatus.LoggingEnabled.TargetGrants |
Grantee
|
Container for Type: Container Ancestry: BucketLoggingStatus.LoggingEnabled.TargetGrants.Grant |
LoggingEnabled
|
Container for logging information. This element and its children are present when logging is enabled, otherwise, this element and its children are absent. Type: Container Ancestry: BucketLoggingStatus |
Permission
|
Logging permissions assigned to the Type: String Valid Values: FULL_CONTROL | READ | WRITE Ancestry: BucketLoggingStatus.LoggingEnabled.TargetGrants.Grant |
TargetBucket
|
Specifies the bucket whose logging status is being returned. This element specifies the bucket where server access logs will be delivered. Type: String Ancestry: BucketLoggingStatus.LoggingEnabled |
TargetGrants
|
Container for granting information. Type: Container Ancestry: BucketLoggingStatus.LoggingEnabled |
TargetPrefix
|
Specifies the prefix for the keys that the log files are being stored under. Type: String Ancestry: BucketLoggingStatus.LoggingEnabled |
Special Errors
This implementation of the operation does not return special errors. For general information about Amazon S3 errors and a list of error codes, see Error Responses.
Examples
Sample Request
The following request returns the logging status for mybucket
.
GET ?logging HTTP/1.1 Host: mybucket.s3.amazonaws.com Date: Wed, 25 Nov 2009 12:00:00 GMT Authorization: AWS 02236Q3V0WHVSRW0EXG2:0RQf4/cRonhpaBX5sCYVf1bNRuU=
Sample Response Showing an Enabled Logging Status
HTTP/1.1 200 OK Date: Wed, 25 Nov 2009 12:00:00 GMT Connection: close Server: AmazonS3 <?xml version="1.0" encoding="UTF-8"?> <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01"> <LoggingEnabled> <TargetBucket>mybucketlogs</TargetBucket> <TargetPrefix>mybucket-access_log-/</TargetPrefix> <TargetGrants> <Grant> <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"> <EmailAddress>[email protected]</EmailAddress> </Grantee> <Permission>READ</Permission> </Grant> </TargetGrants> </LoggingEnabled> </BucketLoggingStatus>
Sample Response Showing a Disabled Logging Status
HTTP/1.1 200 OK Date: Wed, 25 Nov 2009 12:00:00 GMT Connection: close Server: AmazonS3 <?xml version="1.0" encoding="UTF-8"?> <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" />