How to get VM eviction rate through REST API?

Praveen Kumar Manoharan 1 Reputation point

I know that Azure Spot VMs have eviction rates shown in the portal. Is there an API version that we can call to get an Eviction rate for all Sku and regions as shown in the portal?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,515 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
327 questions
{count} votes

3 answers

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 18,852 Reputation points Microsoft Employee

    Hi @Praveen Kumar Manoharan

    I got the confirmation from the Product team that -

    The capability of getting VM eviction rate through REST API is currently not available, but it is on the roadmap.

    The official documentation will be updated when that is released.

    You can also check Azure updates page to get the latest updates on Azure products and features.
    Hope that helps. Let me know if you have further questions.


    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer.

    0 comments No comments

  2. Yann35510 1 Reputation point

    Hi, is there a release date for this feature ?
    I'm very intersting by getting Eviction Rate through REST API

  3. Helder Pinto 1 Reputation point Microsoft Employee

    You can now get Spot Eviction Rates via Azure Resource Graph. More details here:

    Sample query:

    | where type == 'microsoft.compute/skuspotevictionrate/location'
    | where location in ('westeurope','northeurope')
    | project skuName=tostring(, location, evictionRate=properties.evictionRate
    | order by skuName

    0 comments No comments