You can use the automation REST APIs to edit the configuration of a VM class that you created or a predefined VM classes that vSphere with Tanzu offers. When you no longer need an existing VM class, you can remove it from your vCenter Server instance.

Note that editing a VM class specification does not affect the VMs that are already deployed by the DevOps engineers from this class. Only newly deployed VMs will use the reconfigured VM class.

Deleting a VM class results in its removal from all related namespaces. All VMs deployed with this VM class remain unchanged but DevOps engineers can no longer use it.

You can list all VM classes available for a vCenter Server instance by using the GET https://<vcenter_ip_address_or_fqdn>/api/vcenter/namespace-management/virtual-machine-classes HTTP request. You receive a list of all VM classes and a detailed information about each one of them. Based on the detailed information, you can narrow the list and retrieve the IDs of the VM classes that you want to edit or delete.

To edit a VM class configuration, use the PATCH https://<vcenter_ip_address_or_fqdn>/api/vcenter/namespace-management/virtual-machine-classes/vm_class_id HTTP request and pass the update specification in the request body. You can edit all VM class attributes except the ID of the class. Only the attributes modified within the update specification will be edited.

To delete a VM class from your environment, use the DELETE https://<vcenter_ip_address_or_fqdn>/api/vcenter/namespace-management/virtual-machine-classes/vm_class_id HTTP request.