Here is the API call you can use on the Primary NSX Manager to assign tags to VMs (which could also be running on the secondary):
POST /api/2.0/services/securitytags/tag/{tag-id}/vm?action=attach
The request body will depend on the Unique ID selection criteria. If you are using instance UUID use:
<securityTagAssignment>
<tagParameter>
<key>instance_uuid</key>
<value>a702c039-fb86-4c5f-b8f4-1c2d80299c97</value>
</tagParameter>
</securityTagAssignment>
You can determine the appropriate security tag-id using:
GET /api/2.0/services/securitytags/tag
No comments:
Post a Comment