apply_vm_tag
Add NSX security tags to virtual machines for microsegmentation and policy enforcement. Preserves existing tags while applying new scope-value pairs to organize VMs into security groups.
Instructions
Apply an NSX tag to a virtual machine.
Existing tags on the VM are preserved — this operation is additive. Use list_vm_tags to get the vm_id (external_id) first.
Args: vm_id: VM external ID (fabric UUID, obtainable from list_vm_tags). tag_scope: Tag scope string (e.g. 'env', 'tier', 'owner'). tag_value: Tag value string (e.g. 'production', 'web'). target: Optional NSX Manager target name from config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vm_id | Yes | ||
| tag_scope | Yes | ||
| tag_value | Yes | ||
| target | No |