Using Azure Resource Graph returned Sku name to call Pricing API

Stanislav Fotev 100 Reputation points
2024-10-09T12:44:14.59+00:00

I am querying the resource graph to get all disks. For a disk I get the returned sku (in my case Standard_LRS) and region . I am then using this sku name and region to query the price sheet api. My goal is to get the cost for this type of disks, but the price sheet api return a lot of results. Which sku should I use to determine a price for the disk.

The calculator estimates a cost of 1.54$ for a S4 HDD in Germany West Central.
Can I make the same estimation using the price sheet api and the information from the resource graph api?

Additionally, can I use the azure calculator via an api call ?

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,668 questions
{count} votes

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.