How can we map azure reservation with the retail price.

Manish Kumar 0 Reputation points
2024-09-18T05:11:16.92+00:00

Thank you in advance for attempting to solve this issue
My organization has multiple Azure tenants, underneath we have 100+ subscriptions. We make a lot of reservations to save costs. However, as an analyst, I am trying to build an automated report that can map reservations with the retail price and determine how much savings we made using the reservation. I am using the below APIs to map the cost.

  • Retail Price public API: https://prices.azure.com/api/retail/prices?api-version=2023-01-01-preview&meterRegion='primary'
  • Reservation Orders: GET https://management.azure.com/providers/Microsoft.Capacity/reservationOrders?api-version=2022-11-01
  • Reservation Transactions: GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/reservationTransactions?$filter=properties/eventDate+ge+2020-05-20+AND+properties/eventDate+le+2020-05-30&api-version=2024-08-01&useMarkupIfPartner=True&previewMarkupPercentage=15.5

I am using ReservationOrderId to join reservation orders and transactions.

To Join the retail price I could find armSKUName and armRegion. However, there are multiple options available for armSKUName and armRegion. That causes duplicates. What I could find in retail price is, MeterId, SKUId, and ProductId what makes it unique, however, I cannot get such details from reservation orders or transactions.

I am trying to understand if there is any API that can uniquely map to the retail price with the reservation. It would be a great help for me and the community if you have encountered the same and found a solution.

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,575 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.