HEAD Bucket
Description
This operation is useful to determine if a bucket exists and you have permission to
access it. The operation returns a 200 OK if the bucket exists and you have
permission to access it. Otherwise, the operation might return responses such as
404 Not Found and 403 Forbidden.
To use this operation, you must have permissions to perform the
s3:ListBucket action. The bucket owner has this permission by default
and can grant this permission to others. For more information about permissions,
see
Permissions Related to Bucket Operations and Managing Access Permissions to Your Amazon S3
Resources in the Amazon Simple Storage Service Developer Guide.
Requests
Syntax
HEAD / HTTP/1.1 Host:BucketName.s3.amazonaws.com Date:dateAuthorization:authorization string(see Authenticating Requests (AWS Signature Version 4))
Request Parameters
This implementation of the operation does not use request parameters.
Request Elements
This implementation of the operation does not use request elements.
Request Headers
This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.
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
This implementation of the operation does not return response elements.
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
HEAD / HTTP/1.1 Date: Fri, 10 Feb 2012 21:34:55 GMT Authorization:authorization stringHost: myawsbucket.s3.amazonaws.com Connection: Keep-Alive
Sample Response
HTTP/1.1 200 OK x-amz-id-2: JuKZqmXuiwFeDQxhD7M8KtsKobSzWA1QEjLbTMTagkKdBX2z7Il/jGhDeJ3j6s80 x-amz-request-id: 32FE2CEB32F5EE25 Date: Fri, 10 2012 21:34:56 GMT Server: AmazonS3


