Tagging
Methods for working with object tagging:
- PutObjectTagging — Add or change an object tag.
- GetObjectTagging — Get an object tag.
- DeleteObjectTagging — Delete all object tags.
Adds tags to an existing object. If the object already has tags, they are replaced with the specified new tags. A tag is a key/value pair.
Request body:
<?xml version="1.0" encoding="UTF-8"?><Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><TagSet><Tag><Key>string</Key><Value>string</Value></Tag></TagSet></Tagging>
Request parameters:
Parameter | Type | Description |
|---|---|---|
| ||
| repeating complex element | A tag consisting of a |
| xs:string (string) | Tag key |
| xs:string (string) | Tag value |
Successful response code
HTTP: 200 OK.
Error codes
Error code | Description | HTTP status code |
|---|---|---|
InternalError | Internal error | 500 Internal Error |
AccessDenied | Access denied. The account ID does not match the bucket owner | 400 Bad Request |
MalformedXML | The request XML does not match the schema | 400 Bad Request |
MissingRequestBodyError | Empty request body | 400 Bad Request |
BadRequest | The number of tags in the request exceeds the set limit | 400 Bad Request |
Returns the set of object tags.
Request example:
GET /{Key+}?tagging HTTP/1.1Host: my-test-bucket1.hb.bizmrg.com
Response example:
HTTP/1.1 200<?xml version="1.0" encoding="UTF-8"?><Tagging><TagSet><Tag><Key>key-object1</Key><Value>value-object1</Value></Tag><Key>key-object2</Key><Value>value-object2</Value></Tag></TagSet></Tagging>
Deletes the entire set of tags from the specified object.
Request example:
DELETE /{Key+}?tagging HTTP/1.1Host: my-test-bucket1.hb.bizmrg.com
Successful response code
HTTP: 204.