I think you need to get all rules with /cluster/ha/rules, find the one you need and add your vm to the resources field. I'm not done with the code for appendig yet but for deletion of sub_vm.vmid I wrote this in Ansible:
- name: Get all HA...
Hi,
I'm trying to convert my HA playbooks from HA groups to HA rules. I'm using the API as described under https://pve.proxmox.com/pve-docs/api-viewer/index.html
Let's begin with asking about existing rules. I have one rule which was created by...