Good afternoon, everyone! I am working on vSphere Client version 8 and laters. The objects have tags, they need to be pulled out. I mainly work with SOAP, I tried the ListTagsAttachedToVStorageObject and AttachTagToVStorageObject methods. The tag is attached to the object, but is not visible through the vSphere Client - the tag window for the object is empty and the tag itself does not show that it is attached to the object. However, if the SAME tag is attached via vSphere Client, it cannot be unpinned, only after the DetachTagFromVStorageObject method. These methods work with vslmTagEntry
I saw it in the library https://github.com/vmware/govmomi that there are other Tag entities, but they are only available through json queries in the section https://github.com/vmware/govmomi/tree/main/vapi .
My question is: What is the difference between vslmTagEntry and Tag?
Here is my C++ code (don't let it confuse you, the most important thing is that it works)
DetachTagFromVStorageObjectRequestType req;
req.this = GetServiceContent()->vStorageObjectManager;
ID ID;
ID.id = "urn:vmomi:VirtualMachine:vm-6066:e2244e27-619a-45bc-878f-a6f8642948f8";
req.id = &ID;
req.category = "my-category";
req.tag = "my-tag";
DetachTagFromVStorageObjectResponse resp;
if(const std::exception& error = supp->Call(&DetachTagFromVStorageObject, &req, &resp))
{
throw error;
}