mc tag set
Assigns a tag to a bucket or an object on a local cluster or a remote fabric in the global namespace.
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. For target, use the format
<alias>/<bucketname> for a local
cluster and
<alias>/<clustername>-<bucketname>
for a remote cluster on the global namespace. |
json |
Enable JSON formatted output. |
debug |
Enable output for debugging. |
insecure |
Disable SSL verification. |
help |
Show command help. |
Examples
-
Assign tags to an object.
- CLI
-
/opt/mapr/bin/mc tag set play/testbucket/testobject "key1=value1&key2=value2&key3=value3"
-
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"
- 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"
- Assign tags to a bucket.
- CLI
-
/opt/mapr/bin/mc tag set myminio/testbucket "key1=value1&key2=value2&key3=value3"
- Assign tags to a bucket.
- CLI
-
/opt/mapr/bin/mc tag set myminio/testbucket "key1=value1&key2=value2&key3=value3"
- Assign tags to a bucket named testbucket on remote
cluster sales with object store alias named myminio.
- CLI
-
/opt/mapr/bin/mc tag set myminio/sales-testbucket "key1=value1&key2=value2&key3=value3"
- Assign tags to the object testobject with version
id ieWHA contained in the bucket named testbucket on remote
cluster sales with object store alias named myminio.
- CLI
-
/opt/mapr/bin/mc tag set --version-id "ieWHa" myminio/sales-testbucket/testobject "key1=value1&key2=value2&key3=value3"