The underlying products (vSphere, vSAN & NSX) that run within VMware Cloud on AWS (VMC) are constantly being improved with new capabilities and enhancements. As a service, VMC is updated more frequently than a traditional on-premise environment and one huge benefit for our customers is that they get to access all the latest and greatest features of the platform!

Yesterday, I came to learn about some improvements that we had made to our vSphere Tagging infrastructure to start publishing vCenter Server Events for when a vSphere Tag is attached or detached from an inventory object such as a Virtual Machine. This has been a frequently requested feature by our customers, especially for auditing purposes and this also enables the ability to perform additional actions through the use of a vCenter Alarm.

In the vSphere UI for a VMC vCenter Server, you can now see these new tagging events by selecting the vCenter Server inventory object and then go to Monitor->Events and filter by "attached tag" or "detached tag".





The two new tag events are defined by the following new event types in vCenter Server:

com.vmware.cis.tagging.attach

com.vmware.cis.tagging.detach

This also means that you can programmatically retrieve these events using the vSphere API or any of the supported vSphere SDKs including PowerCLI.

Here are some examples using PowerCLI and the Get-VIEvent and filtering by the two new event type:

Get-VIEvent | where {$_.EventTypeId -match "com.vmware.cis.tagging.attach"}

Get-VIEvent | where {$_.EventTypeId -match "com.vmware.cis.tagging.detach"}



One thing that I did notice is that we currently do not publish events for basic CRUD (Create, Update & Delete) operations for vSphere Tags as well as Tag Categories, I know this is probably something customers would also like to see in addition to attaching and detaching a tag. Hopefully this is something that can also be improved in a future update and let us know if this is something you would be interested in or if there are other scenarios related to tags that should be captured as part of our vCenter Event stream.