Skip to content

[question]: correct way to list VMs via API #289

@raffaelespazzoli

Description

@raffaelespazzoli

Thank you for your contribution and feedback! Help us review faster by providing the following information:

This issue is a: (mark with an x)

  • question
  • bug report
  • request for new sample
  • documentation issue or request
  • regression (a behavior that used to work and stopped in a new release)

Steps to reproduce:

I'm trying to get a list of VMs, I'm running this call:

i.compute.ListComplete(context, resourceGroupName)

and I get an empty result, not an error.

If I do the same from the command line:

az vm list -g cluster-raffa-zqh7w-rg

using the same resourceGroupName, I get the expected result?
What am I doing wrong? Could this be a permission issue?
Currently the account used to make the call has this role: "Virtual Machine Contributor".

I get the same empty result set also with:

i.compute.List(context, resourceGroupName)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions