Does Azure SDK for JS "Virtual Machines - List" does it exist?

153 Views Asked by At

I see it int he compute docs

https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/list

But I dont see it in the azure package

https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/src/computeManagementClient.ts

Am I overlooking how they're translating the restful pattern to the JS SDK?

2

There are 2 best solutions below

0
On

They do list the VM

//this is used to list all the VM's
const vm_list = await compute_client.virtualMachines.listAll();
//this is used to list the VM
const vm_list = await compute_client.virtualMachines.list();
0
On

They do! I don't know why I didn't see it in that file, but my VScode autocomplete (their package is well typed) showed what I'm looking for:

const result = await this.ComputeManagementClient.virtualMachines.list('testing_group')