Skip to main content

HeadBucket

Determines if a bucket exists.

Description

The HeadBucket 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. It otherwise returns a 404.

note

If you make a HEAD request to check a bucket's existence, you should examine the HTTP status code in the response:

  • 200: Bucket exists
  • 404: Bucket does not exist

Request Syntax

HEAD / HTTP/1.1
Host: BucketName.qstorage.quilibrium.com
x-amz-expected-bucket-owner: OwnerAccountId
Values in italics indicate user input and should be replaced with actual values.

This operation does not have a request body.

Request Parameters

Headers

NameDescriptionRequiredType
x-amz-expected-bucket-ownerThe account ID of the expected bucket ownerNotext

Examples

HEAD / HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
x-amz-expected-bucket-owner: 123456789012
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 200 OK
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Date: Wed, 01 Mar 2024 12:00:00 GMT
Values in italics indicate variable response values.

Response Syntax

HTTP/1.1 200 OK
x-amz-id-2: RequestId
x-amz-request-id: AmazonRequestId
Date: ISO8601Date
Values in italics indicate variable response values.

Response Elements

Response Headers

NameDescriptionRequiredType
x-amz-id-2An identifier for the requestNoString
x-amz-request-idA unique identifier for the requestNoString
DateThe date and time at which the response was sentNoString

This operation does not return a response body.

Special Errors

Error CodeDescription
404The specified bucket does not exist

Permissions

You must have the s3:ListBucket permission.

Try It Out

Test HeadBucket

Check if a bucket exists and you have permission to access it.

Coming Soon

This feature is currently under development and will be available soon.