REST API to list all available VMs in West Europe

MS Techie 2,676 Reputation points
2021-10-21T14:52:56.197+00:00

Do we have a REST API to list all available VM sizes in West Europe (for use in my several subscriptions)

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,113 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChristopherW-MSFT 1,681 Reputation points
    2021-10-21T18:01:44.8+00:00

    Hi @MS Techie ,

    If you need to check Available Sizes for the Subscription, you can run a GET 'providers/Microsoft.Compute' for all of the SKUs for Microsoft.Compute with a Location Filter.
    https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list

    Example:

    GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus?api-version=2021-07-01&$filter={$filter}&includeExtendedLocations={includeExtendedLocations}   
    

    If you need to check all Resources that currently exist in the Subscription, then you can run GET 'resources'.
    https://learn.microsoft.com/en-us/rest/api/resources/resources/list