Skip to main content

HeadBucket

You can use this operation to determine if a bucket exists and if you have permission to access it. The action returns a 200 OK if the bucket exists and you have permission to access it.

note

If the bucket does not exist or you do not have permission to access it, the HEAD request returns a generic 400 Bad Request, 403 Forbidden or 404 Not Found code. A message body is not included, so you cannot determine the exception beyond these HTTP response codes.

Permissions

ActionDescriptionResource
ListBucketGrants permission to list some or all of the objects in an Astran S3 bucket (up to 1000)bucket

Request Syntax

HEAD /Bucket HTTP/1.1
Host: <partition>.s3.astran.io

URI Request Parameters

The request uses the following URI parameters.

Bucket

The bucket name.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

Errors

NoSuchBucket

The specified bucket does not exist.

HTTP Status Code: 404

Examples

Sample Request for general purpose buckets

This example illustrates one usage of HeadBucket.

            HEAD /bucket HTTP/1.1
Date: Fri, 10 Feb 2012 21:34:55 GMT
Authorization: authorization string
Host: <partition>.s3.astran.io
Connection: Keep-Alive

Sample Response for general purpose buckets

This example illustrates one usage of HeadBucket.

            HTTP/1.1 200 OK
x-request-id: 32FE2CEB32F5EE25
Date: Fri, 10 2012 21:34:56 GMT

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: