Skip to main content

GetBucketTagging

Returns the tag set associated with a bucket.

Description​

The GetBucketTagging operation returns the tag set associated with a bucket. To use this operation, you must have permission to perform the s3:GetBucketTagging action.

Tags are useful for organizing and tracking costs associated with your buckets.

note
  • To use this operation, you must have permission to perform the s3:GetBucketTagging action.
  • You must be the bucket owner to use this operation.
  • If there is no tag set associated with the bucket, QStorage returns a NoSuchTagSet error.

Request Syntax​

GET /?tagging 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​

Example 1: Get bucket tags​

GET /?tagging HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
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
<?xml version="1.0" encoding="UTF-8"?> <Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <TagSet> <Tag> <Key>project</Key> <Value>project-one</Value> </Tag> <Tag> <Key>environment</Key> <Value>production</Value> </Tag> </TagSet> </Tagging>
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
<?xml version="1.0" encoding="UTF-8"?> <Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <TagSet> <Tag> <Key>TagKey</Key> <Value>TagValue</Value> </Tag> </TagSet> </Tagging>
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

Response Body Elements​

NameDescriptionRequiredType
TaggingContainer for the tag set. See Tagging for details.NoString
TagSetContainer for a set of tags. See Tag for details of the Tag elements.NoString

Special Errors​

Error CodeDescription
NoSuchBucketThe specified bucket does not exist
NoSuchTagSetThere is no tag set associated with the bucket
403Forbidden. Authentication failed or you do not have permission to get the bucket tags

Permissions​

You must have the s3:GetBucketTagging permission.

Try It Out​

Test GetBucketTagging

Get the tag set associated with a bucket.

Coming Soon

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