Reconfiguring a Cluster
You can alter a vSphere cluster by calling the ComputeResource.ReconfigureComputeResource_Task method. You can alter an HCI cluster by calling the ClusterComputeResource.ExtendHCI_Task method.
To reconfigure a vSphere cluster, for instance to enable or disable VMware DRS or VMware HA, you can change properties in the ComputeResourceConfigSpec data object, and pass it in to ReconfigureComputeResource_Task. For relevant properties, see Creating a Cluster. To enlarge a vSphere cluster, you can call AddHost_Task.
To enlarge an HCI cluster, possibly after adding hosts with BatchAddStandaloneHosts_Task, you can call ClusterComputeResource.ExtendHCI_Task, passing in the new hosts as parameter hostInputs.
To move a datacenter host into a cluster, or from one cluster to another if the host is in maintenance mode, you can call the ClusterComputeResource.MoveInto_Task method. The MoveHostInto_Task method is similar but allows moving the host into a nested resource pool.
To move hosts out of a cluster, and make them standalone hosts in the datacenter, you can call the Folder.MoveIntoFolder_Task method.
To remove a host from a cluster, and from the datacenter, you can call the Folder.Destroy_Task method, if you are granted the Host.Inventory.RemoveHostFromCluster privilege.