Hello @DC20005 Thank you for reaching out to us. Happy to answer your questions!
I understand that you want to find out details of Azure resources that are either part of reserved instances or billed per Pay-As-You-Go.
Reservation discounts are “use-it-or-lost-it” and applied to resource usage for that hour matching the attributes you select when you buy a reservation. There are several considerations that can impact which VM instances get the benefits (or do not get the benefits) – including the scope of reservation (shared versus single), instance size flexibility configuration, resource management operations like deallocation, deletion, scale etc., during the day. In those scenarios, Microsoft will try to match other resources (usage from VM instances) in the specified scope to apply the benefit (as long as there are matching resources towards the reservation during that hour, customers should get the benefit – otherwise they lose it). So when you are looking at a usage report at a daily grain, it is possible that you’ll see this behavior.
Understand Azure Reserved VM Instances discount | Microsoft Learn
For buying Reservations, I would recommend the below Learn articles:
• Determine what Azure reservation you should purchase | Microsoft Learn
• Buy an Azure reservation | Microsoft Learn
For Reservation utilization (post purchase):
• API: Generate Cost Details Report - Create Operation - REST API (Azure Cost Management) | Microsoft Learn
o Make sure to use “AmortizedCost” for CostDetailsMetricType in the request
• UI (for quick analysis): View amortized reservation costs - Microsoft Cost Management | Microsoft Learn
If you are looking to have this:
• Pre-purchase: You can buy reservations at “shared” scope for broader utilization of a reservation across your VM resources.
• Post purchase utilization: You can download amortized usage details and use “Pricing Model” == Reservation for the VM resources that got the reservation benefits. If you use “PricingModel == OnDemand”, it should include the superset of all usage that did not get the reservation benefits (note it is about usage and it is possible that some part of the daily usage of the same VM instance gets reservation benefits versus some not getting the benefits).
o For quick analysis of the same, you can use Cost Analysis “Amortized Cost” view with above mentioned filters.
For your reference: https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-apis
Hope this helps. Please reply if you need any further assistance!
----------------------------------------------------------------------------------------------------------------------
If the response helped, do "Accept Answer" and up-vote it