Menu
Amazon Simple Storage Service
API Reference (API Version 2006-03-01)

GET Bucket tagging

Description

This implementation of the GET operation uses the tagging subresource to return the tag set associated with the bucket.

To use this operation, you must have permission to perform the s3:GetBucketTagging action. By default, the bucket owner has this permission and can grant this permission to others.

Requests

Syntax

Copy
GET /?tagging HTTP/1.1 Host: BucketName.s3.amazonaws.com Date: date Authorization: authorization string (see Authenticating Requests (AWS Signature Version 4))

Request Parameters

This implementation of the operation does not use request parameters.

Request Headers

This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.

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
Tagging

Contains the TagSet and Tag elements.

Type: Container

Ancestry: None

TagSet

Contains the tag set.

Type: Container

Ancestry: Tagging

Tag

Contains the tag information.

Type: Container

Ancestry: TagSet

Key

Name of the tag

Type: String

Ancestry: Tag

Value

Value of the tag

Type: String

Ancestry: Tag

Special Errors

  • NoSuchTagSetError - There is no tag set associated with the bucket.

Examples

Sample Request

The following request returns the tag set of the specified bucket.

Copy
GET ?tagging HTTP/1.1 Host: bucket.s3.amazonaws.com Date: Wed, 28 Oct 2009 22:32:00 GMT Authorization: authorization string

Sample Response

Copy
HTTP/1.1 200 OK Date: Wed, 25 Nov 2009 12:00:00 GMT Connection: close Server: AmazonS3 <Tagging> <TagSet> <Tag> <Key>Project</Key> <Value>Project One</Value> </Tag> <Tag> <Key>User</Key> <Value>jsmith</Value> </Tag> </TagSet> </Tagging>