How to use azure cli to list the vms of a specific subscription/resource group of their resources used, like size of the VM, and type of OS, etc?
Like in How to get a list of available vm sizes in an azure location, it can only list by azure location, but I want to filter by resource group instead.
and Azure CLI | list resources is totally irrelevant of this question.
Specifically,
- Given a name of the Subscription,
- list all resource groups under it, together with
- the VMs each resource groups contains, and
- the size of the VM (Both CPU and Disk), and the types of each OS
- output the above in a hierarchical json data using the command
az