mc tag set

Assigns a tag to a bucket or an object.

Syntax

CLI
USAGE:

  /opt/mapr/bin/mc tag set [FLAGS] TARGET TAGS

                        
FLAGS:
  --versionid value, --vid value  set tags on a specific object version
  -- rewind value                 set tags on a specific object version at specific time
  --versions                      set tags on multiple versions for an object
  --json                          enable JSON lines formatted output
  --debug                         enable debug output
  --insecure                      disable SSL certificate verification
  --help, -h                      show help               

Parameters

Parameter Description
versionid or vid The object version ID.
rewind Use the rewind flag to set tags on a specific object version at specific time.
versions Use versions to specify multiple version numbers.
target tags the tag or tags to assign to the bucket or the object. Upto 10 tags can be assigned. Multiple tags can be separated using an ampersand.
json Enable JSON formatted output.
debug Enable output for debugging.
insecure Disable SSL verification.
help Show command help.

Examples

  1. Assign tags to an object.
    CLI
    /opt/mapr/bin/mc tag set play/testbucket/testobject "key1=value1&key2=value2&key3=value3"
  2. Assign tags to a particular version of an object.

    CLI
    /opt/mapr/bin/mc tag set --version-id "ieQq7aXsyhlhDt47YURGlrucYY3GxWHa" play/testbucket/testobject "key1=value1&key2=value2&key3=value3"
  3. Assign tags to a object versions older than one week.
    CLI
    /opt/mapr/bin/mc tag set --versions --rewind 7d play/testbucket/testobject "key1=value1&key2=value2&key3=value3"
  4. Assign tags to a bucket.
    CLI
    /opt/mapr/bin/mc tag set myminio/testbucket "key1=value1&key2=value2&key3=value3"
  5. Assign tags to a bucket.
    CLI
    /opt/mapr/bin/mc tag set myminio/testbucket "key1=value1&key2=value2&key3=value3"