curl -X PATCH -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"spec":{"cores_per_socket":0,"count":0,"hot_add_enabled":false,"hot_remove_enabled":false}}' https://{api_host}/rest/vcenter/vm/{vm}/hardware/cpu
I have the code for session id and URL , I need to map the code for -d part where inputs are to be provided like cpu count and all.
This should do it, so long as you're running on Java 11+