Policy > Infra > Tags

Assign or Unassign tag on multiple Virtual Machines.

Tag can be assigned or unassigned on multiple objects. Supported object type is
restricted to Virtual Machine for now and support for other objects will be added
later. Permissions for tag bulk operation would be similar to virtual machine
tag permissions.

Request:

Method:
PUT
URI Path(s):
/policy/api/v1/infra/tags/tag-operations/<operation-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
TagBulkOperation+

Example Request:

PUT https://<policy-mgr>/policy/api/v1/infra/tags/tag-operations/win-vm-update { "tag": { "scope": "os", "tag": "windows" }, "apply_to": [ { "resource_type": "VirtualMachine", "resource_ids": [ "ee98a906-7b84-42ae-9413-d812cdb64543" ] } ], "remove_from":[ { "resource_type": "VirtualMachine", "resource_ids": [ "564d8b81-983d-b8ef-686b-161205939c58" ] } ] }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
TagBulkOperation+

Example Response:

{ "tag": { "scope": "os", "tag": "windows" }, "apply_to": [ { "resource_type": "VirtualMachine", "resource_ids": [ "ee98a906-7b84-42ae-9413-d812cdb64543" ] } ], "remove_from":[ { "resource_type": "VirtualMachine", "resource_ids": [ "564d8b81-983d-b8ef-686b-161205939c58" ] } ], "resource_type": "TagBulkOperation", "id": "win-vm-update", "display_name": "win-vm-update", "path": "/infra/tags/tag-operations/win-vm-update", "relative_path": "win-vm-update", "parent_path": "/infra/tags/tag-operations", "marked_for_delete": false, "_create_user": "admin", "_create_time": 1544641564432, "_last_modified_user": "admin", "_last_modified_time": 1544641564432, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }

Required Permissions:

crud

Feature:

policy_vm_vm_tags

Additional Errors: