Attach Tag Association
Attaches the given tag to the input object. The tag needs to meet the cardinality (CategoryModel.cardinality) and associability (CategoryModel.associable-types) criteria in order to be eligible for attachment. If the tag is already attached to the object, then this operation is a no-op and an error will not be thrown. To invoke this operation, you need the attach tag privilege on the tag and the read privilege on the object.
Request
URLURL
Path Parameters
Path Parameters
The identifier of the input tag. The parameter must be an identifier for the resource type: com.vmware.cis.tagging.Tag.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"object_id": {
"id": "string",
"type": "string"
}
}
Authentication
Errors
Errors
com.vmware.vapi.std.errors.invalid_argument : if the input tag is not eligible to be attached to this object or if the objectId is not valid.
com.vmware.vapi.std.errors.unauthorized : if you do not have the privilege to attach the tag or do not have the privilege to read the object.
com.vmware.vapi.std.errors.not_found : if the tag for the given tagId does not exist in the system.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/com/vmware/cis/tagging/tag-association/id:{tag_id}?~action=attach
x-vmw-doc-operation: attach