New capabilities
Users have the option to manage object tags by using a new tagging query parameter option to the put/get/delete object operations, or by using a new tagging header option for object write operations (put/post/putCopy/initiateMultipartUpload.) There is a tagging count response header for get/head object.
- The object tags are encrypted in the same manner as the corresponding object is, with the exception of SSE-C encryption.
- SDK support for tagging is provided in the Python and node.js languages.
- Writing tags to objects requires write permissions to bucket.
- Method 1: Add Tags when writing the object. Include Tags in the x-amz-tagging header in PUT/POST/PutCopy/Initiate MPU operations.
- Method 2: Add/Modify tags after the object is written. Add tags using the tagging query
parameter for the PUT object operation “PUT Object?tagging” and include the tags
in the body of the request.Note: There can be up to ten tags added per object.
- Maximum key length – 128 Unicode characters in UTF-8
- Maximum value length – 256 Unicode characters in UTF-8
Note: The combined header size is limited to 8 K bytes. See more details on the operation in the CSO API guide.
- Reading tags on objects requires read permissions to object.
- A list of the tags associated with an object can be retrieved by using the tagging query parameter on the GET Object request “GET Object?tagging.” The response includes all the tags that are stored for the object, or an empty tag set if the object does not have any tags.
- Getting a count on the number of tags on an object.
- The response to a GET/HEAD Object request includes a x-amx-tagging-count header for objects that have one or more tags. This header shows the total number of tags associated with the object
- Deleting all the tags on an object requires write permissions to bucket.
- The deletion of all the tags on an object can be done by using the tagging query parameter on the delete object request “DELETE Object?tagging.”
Note: Future enhancements to this feature allow for tag based operations, such as lifecycle expiration, which is used to select for objects by tags. - Deleting/Modifying a subset of the tags on an object:
- To remove a subset of the tags, it is recommend that all the tags on an object are first retrieved using the “GET Object?tagging” request and then writing the all inclusive new list of tags using the “PUT Object?tagging” request.