Is there a wait() function available for azure nodejs SDK just like what python SDK has. Below is my python code to start a VM in azure
async_vm_start = compute_client.virtual_machines.start(group_name, vm_name)
async_vm_start.wait()
So here my whole program waits till the VM completely spins up and proceeds. Below is my nodejs code to start a VM
clientCompute.virtualMachines.start(resourceGroupName, vmName, function(err, result) {
if (err) console.log(err);
else console.log(result);
})
Here my program don't wait and just proceeds further even though behind the scenes the VM is still in the process of starting.
I have tried setTimeout but it's not reliable. So is there any way for my nodejs function to wait till the VM completely start.
Thanks in advance