After you create a tag, you can assign the tag to a vSphere managed object. Tags make the inventory objects in your virtual environment more sortable and searchable.

This procedure describes the steps for applying a tag to a cluster object in your inventory.

Prerequisites

Obtain the managed object identifier for the specified cluster.

To get the managed object identifier of the ClusterComputeResource, you must access vCenter Server by using the vSphere Web Services API.

Procedure

  1. Construct a dynamic object identifier for the cluster.

    The dynamic identifier includes the type and ID of the managed object reference.

  2. Attach the tag to the cluster.
    POST https://<vcenter_ip_address_or_fqdn>/api/cis/tagging/tag-association/<tag_id>?action=attach