Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
awscli / awscli / examples / s3api / get-object-tagging.rst
Size: Mime:
**To retrieve the tags attached to an object**

The following ``get-object-tagging`` example retrieves the values for the specified key from the specified object. ::

    aws s3api get-object-tagging \
        --bucket my-bucket \
        --key doc1.rtf

Output::

    {
        "TagSet": [
            {
                "Value": "confidential",
                "Key": "designation"
            }
        ]
    }

The following ``get-object-tagging`` example tries to retrieve the tag sets of the object ``doc2.rtf``, which has no tags. ::

    aws s3api get-object-tagging \
        --bucket my-bucket \
        --key doc2.rtf

Output::

    {
        "TagSet": []
    }


The following ``get-object-tagging`` example retrieves the tag sets of the object ``doc3.rtf``, which has multiple tags. ::

    aws s3api get-object-tagging \
        --bucket my-bucket \
        --key doc3.rtf

Output::

    {
        "TagSet": [
            {
                "Value": "confidential",
                "Key": "designation"
            },
            {
                "Value": "finance",
                "Key": "department"
            },
            {
                "Value": "payroll",
                "Key": "team"
            }
        ]
    }