NSX-T Data Center REST API

Apply tags on virtual machine (Deprecated)

Allows an admin to apply multiple tags to a virtual machine. This operation
does not store the intent on the policy side. It applies the tag directly
on the specified enforcement point. This operation will replace the existing
tags on the virtual machine with the ones that have been passed. If the
application of tag fails on the enforcement point, then an error is
reported. The admin will have to retry the operation again. Policy
framework does not perform a retry. Failure could occur due to multiple
reasons. For e.g enforcement point is down, Enforcement point could not
apply the tag due to constraints like max tags limit exceeded, etc.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX. Deprecated: This API has been deprecated. Please use the new API POST /infra/realized-state/virtual-machines//tags

Request:

Method:
POST
URI Path(s):
/policy/api/v1/infra/realized-state/enforcement-points/{enforcement-point-name}/virtual-machines?action=update_tags
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
VirtualMachineTagsUpdate+

Example Request:

{ "virtual_machine_id": "ID-0", "tags": [ {"scope": "web", "tag": "web-vm"}, {"scope": "ostype", "tag": "WINDOWS"} ] }

Successful Response:

Response Code:
204 No Content
Response Headers:
n/a
Response Body:
n/a

Required Permissions:

crud

Feature:

vm_vm_info

Additional Errors: