Hi
i don’t know where to report this(no feedback menu on Redocly), but since people may encounter this issue too, i guess they may land here while searching for a solution.
As of 11 April 2025, there is an error in the documentation of APIv4 (python version) with regard to associating categories to a VM.
The page is here: https://developers.nutanix.com/api-reference?namespace=vmm&version=v4.0
The example code says at one line:
associateVmCategoriesParams = ntnx_vmm_py_client.AssociateVmCategoriesParams()

well, upon investigating the ntnx_vmm_py_client libraries, i’ve noticed that the class AssociateVmCategoriesParams is imported using AS, therefore with different names depending on technology, as follows:
from ntnx_vmm_py_client.models.vmm.v4.ahv.config.AssociateVmCategoriesParams import AssociateVmCategoriesParams as AhvConfigAssociateVmCategoriesParams
from ntnx_vmm_py_client.models.vmm.v4.ahv.config.DisassociateVmCategoriesParams import DisassociateVmCategoriesParams as AhvConfigDisassociateVmCategoriesParams
from ntnx_vmm_py_client.models.vmm.v4.esxi.config.AssociateVmCategoriesParams import AssociateVmCategoriesParams as EsxiConfigAssociateVmCategoriesParams
from ntnx_vmm_py_client.models.vmm.v4.esxi.config.DisassociateVmCategoriesParams import DisassociateVmCategoriesParams as EsxiConfigDisassociateVmCategoriesParams
Considering this, the example for AHV should be:
associateVmCategoriesParams = ntnx_vmm_py_client.AhvConfigAssociateVmCategoriesParams()
and so on for ESX respectively the same for disassociation of categories.