Attach Multiple Tags To Object Tag Association
Attaches the given tags to the input object. If a tag is already attached to the object, then the individual operation is a no-op and an error will not be added to TagAssociation.BatchResult.error-messages. To invoke this operation, you need the read privilege on the object and the attach tag privilege on each tag.
Request
URLURL
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"
},
"tag_ids": [
"string"
]
}
The identifiers of the input tags. The parameter must contain identifiers for the resource type: com.vmware.cis.tagging.Tag.
Authentication
Response
Response BodyResponse Body
The outcome of the batch operation and the list of error messages (TagAssociation.BatchResult.error-messages) describing attachment failures.
{
"error_messages": [
{
"args": [
"string"
],
"default_message": "string",
"id": "string",
"localized": "string",
"params": {
"key": {
"d": 0,
"dt": "string",
"format": "SHORT_DATE",
"i": 0,
"l": {
"id": "string",
"params": "StdLocalizationParam Object"
},
"precision": 0,
"s": "string"
}
}
}
],
"success": false
}
This is true if the batch operation completed without any errors. Otherwise it is false and all or some operations have failed.
Errors
com.vmware.vapi.std.errors.unauthorized : if you do not have the privilege to read the object.
‘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?~action=attach-multiple-tags-to-object
x-vmw-doc-operation: attach_multiple_tags_to_object