问题
I want to get the most up to date actual costs in Azure. There seem to be 4 ways of doing this with different results:
- Export Costs to Storage Account
- Cost Management API
- Billing API
- Consumption API
Number 1 works well but I need an API, not a file dump.
Number 2 seems to be made for powering the Cost Management UI with high-speed dimension querying
Number 3 seeems to be in Preview but legacy (!)
Which brings me to number 4. I compared this query with the output from the CSV Cost Export file and noticed these differences in yellow:
https://management.azure.com//subscriptions/734d4013-00e7-4561-8e04-2121d8d5a702/providers/Microsoft.Consumption/usageDetails?api-version=2019-10-01&$filter=properties/usageStart eq '2020-12-01' and properties/usageEnd eq '2020-12-01'&$expand=meterDetails,additionalInfo
My question are:
- Is the Export file the SAME information as the API or is it applying additional business logic that I need to cater for?
- Is this API call above the most up to date costs?
- Do I need to do anything with a rate card or take into account azure deals or discounts or is everything self-contained in this?
- There was a bigger "Usage" return type with more columns (Called Modern, not Legacy) but I needed a Billing ID to access it, which I could not find (I am using a VS MSDN Subscription) - how can I use the modern return types?
来源:https://stackoverflow.com/questions/65477024/what-business-logic-is-the-azure-cost-export-applying