What business logic is the Azure Cost Export applying?

走远了吗. 提交于 2021-02-05 11:30:49

问题


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:

  1. Export Costs to Storage Account
  2. Cost Management API
  3. Billing API
  4. 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:

  1. Is the Export file the SAME information as the API or is it applying additional business logic that I need to cater for?
  2. Is this API call above the most up to date costs?
  3. 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?
  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!