cos:GetObjectTagging.cos:PutObjectTagging.cos:DeleteObjectTagging../coscli object-tagging --method [method] cos://<bucket-name>/object [tag_key]#[tag_value]
Parameter Format | Description | Example |
cos://<bucket-name> | Specify the target bucket. Supports using the bucket alias or bucket name in configuration parameters. If using the bucket name for access, you must also carry the endpoint flag. | Access with the bucket alias: cos://example-alias Access with the bucket name: cos://examplebucket-1250000000 |
Flag Abbreviation | Flag Name | Description |
-h | --help | Views the usage of this command. |
None | --method | Specify the operation to perform, including put (set tag), get (query tag), delete (delete tag), and add (add tag). |
None | --version-id | Specified version of the operation object |
./coscli object-tagging --method put cos://bucketAlias/object key1#value1 key2#value2
key#value represents the tag key-value pair Key-Value, where key and value are separated #. If the object has no tags, this command will add the designated tags to the object. If the object already has tags, this command will overwrite the original tags../coscli object-tagging --method put cos://example-alias/object 1#111 2#222
./coscli object-tagging --method get cos://bucketAlias/object
./coscli object-tagging --method get cos://example-alias/object
KEY | VALUE------+--------1 | 1112 | 222
./coscli object-tagging --method delete cos://bucketAlias/object key1#value1
./coscli object-tagging --method delete cos://example-alias/object 1#111
./coscli object-tagging --method delete cos://bucketAlias/object
./coscli object-tagging --method delete cos://example-alias/object
./coscli object-tagging --method add cos://bucketAlias/object key3#value3
key#value represents the tag key-value pair Key-Value, where key and value are separated by #../coscli object-tagging --method add cos://example-alias/object 1#111
Feedback