com.vmware.cis.tagging.tag_association

The tag_association service provides operations to attach, detach, and query tags.

attach

POST /com/vmware/cis/tagging/tag-association/id:{tag_id}?~action=attach
POST /com/vmware/cis/tagging/tag-association?~action=attach

Attaches the given tag to the input object. To invoke this operation, you need the attach tag privilege on the tag and the read privilege on the object.
Request:
Representations:
{
    "object_id"{
        "id""obj-103",
        "type""string"
    },
    "tag_id""obj-103"
}
<?xml version="1.0" ?>
<ns0:Attach-Input xmlns:ns0="http://vmware.com/cis/tagging/tag_association" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <object_id>
    <id>obj-103</id>
    <type>string</type>
  </object_id>
  <tag_id>obj-103</tag_id>
</ns0:Attach-Input>
POST /com/vmware/cis/tagging/tag-association?~action=attach
&object_id.id=obj-103
&object_id.type=string
&tag_id=obj-103

Parameters:
Name Type Required Description
tag_id
 *
ID Yes The identifier of the input tag. Id of type com.vmware.cis.tagging.Tag.
object_id
 *
dynamic_ID Yes The identifier of the input object.

Response:
Representations:

Parameters:
Name Type Required Description
result VOID Yes

Errors:
Type Description HTTP Status Code
not_found if the tag for the given tag_id does not exist in the system. 404
invalid_argument if the input tag is not eligible to be attached to this object or if the object_id is not valid. 400
unauthorized if you do not have the privilege to attach the tag or do not have the privilege to read the concerned object. The tag needs to pass the cardinality and associability test in order to be eligible for attachment. 403

Copyright © 2014. All Rights Reserved.