This example assigns a tag to a content library.
This example uses the steps that are described in the Assign the Tag to a Content Library procedure.
using vmware.vapi.std; using vmware.cis.tagging; // 1 - Create a dynamic type ID for the content library. DynamicID libraryDynamicId = new DynamicID(Library.RESOURCE_TYPE, myLibrary.GetId()); // 2- Attach the tag to the ClusterComputeResource managed object. var tagAssociationStub = myStubFactory.CreateStub<TagAssociation>(myStubConfiguration); tagAssociationStub.Attach(myLibrary.GetId(), libraryDynamicId);