Am I able to retrieve the skuId or meterId for an existing VM?

Matthew Simmons 20 Reputation points
2023-10-13T13:04:49.8066667+00:00

Using the Virtual Machine API (https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/get?tabs=HTTP), it doesn't seem possible to view the SKU that a resource is currently being billed with. I can find the hardware profile, of course, but that correlates with the skuName in the Price API (https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices), which isn't unique.

Is it possible to view which skuId or meterId a VM is assigned?

Thanks,

--Matt

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,032 questions
Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
3,606 questions
{count} votes

Accepted answer
  1. Olga Os - MSFT 5,951 Reputation points Microsoft Employee
    2023-10-13T17:23:55.1666667+00:00

    Hello Matthew Simmons,

    Welcome to the MS Q&A forum.

    I am wondering if the Usage Details API will work for you => https://learn.microsoft.com/en-us/rest/api/consumption/usage-details/list?tabs=HTTP#code-try-0

    Sincerely,

    Olga Os.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.