How to get VM eviction rate through REST API?

Praveen Kumar Manoharan 1 Reputation point
2021-09-23T19:34:39.903+00:00

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,106 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.
313 questions
{count} votes

3 answers

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 18,352 Reputation points Microsoft Employee
    2021-09-24T18:11:58.73+00:00

    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
    2022-04-08T15:27:36.253+00:00

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


  3. Helder Pinto 1 Reputation point Microsoft Employee
    2022-09-28T09:01:54.26+00:00

    You can now get Spot Eviction Rates via Azure Resource Graph. More details here: https://learn.microsoft.com/en-us/azure/virtual-machines/spot-vms#azure-resource-graph

    Sample query:

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

    0 comments No comments