You can use the reclamation service to query the VMs in an installation for non-usage and, if they are not in use, mark them as eligible for reclamation.
vRealize Automation API Tips