This section describes all the API-related operations that are specific to object tagging.
By default, the bucket owner has permissions to
PUT,
GET, and
DELETE tags.
All the operations that have the concept of tags are categorized into management operations and object operation with tagging. The operations use the
tagging subresource to manipulate the tags and apply them to the current version of an object. To manipulate tags on a previous version, add
versionId parameter.
Table 1. API operations related to object tagging
Operations
Path
Description
PUT object tagging
PUT /ObjectName?tagging
Adds or replaces a set of tags to an existing object.
GET object tagging
GET /ObjectName?tagging
Returns the set of tags that are associated with the requested object.
DELETE Object tagging
DELETE /ObjectName?tagging
Deletes the set of tags that are associated with the requested object.
The object operations with tagging include existing object operations that can perform tag related actions such as, assigning the tags at the time of object creation or during the copy operation.
Table 2. Object operations with tagging
Operations
Request/Response
Description
PUT object
Request header:
x-amz-tagging
Requires
WRITE permission and
s3:PutObjectTagging permission.
The encoding of tags should follow URL query parameter.
The tags pass as a request header, so the limit is 2 KB.
Initiate Multipart Upload
Request header:
x-amz-tagging
Requires
WRITE permission and
s3:PutObjectTagging permission.
The encoding of tags must follow URL query parameter.
The tags pass as a request header, so the limit is 2 KB.
GET object
Response header:
x-amz-tagging-count
Returns the count of tags that are associated with the object.
Nothing returns, if the permission capability is not set.
The count is not returned, If no tags are associated with the object.
PUT object COPY
Request header: x-amz-tagging-directive
Specifies source object tags copy policy:
COPY: Copies tags as-is
REPLACE: Replaces them with the new set from the request.
The default behavior is
COPY unless explicitly specified by the user.
In case of
REPLACE, the tags must follow URL query parameter encoding.
No tags are allowed with
REPLACE directive, results in no tags on the target object.
Add or extend internal APIs to support tagging. The table defines the S3 APIs to manipulate the tags.
Table 3. S3 APIs
API support
Action
Description
updateObjectTags()
s3:PutObjectTagging
Add or replace set of tags to an existing object.
updateObjectVersionTags()
s3:PutObjectVersionTagging
Add or replace set of tags to an existing version of an object.
getObjectTags()
s3:GetObjectTagging
Retrieve all tags associated with current version of an object.
getObjectVersionTags()
s3:GetObjectVersionTagging
Retrieve all tags associated with specified version of an object.
deleteObjectTags()
s3:DeleteObjectTagging
Delete all tags associated with current version of an object.
deleteObjectVersionTags()
s3:DeleteObjectVersionTagging
Delete all tags associated with specified version of an object.
Data is not available for the Topic
Please provide ratings (1-5 stars).
Please provide ratings (1-5 stars).
Please provide ratings (1-5 stars).
Please select whether the article was helpful or not.
Comments cannot contain these special characters: <>()\