Azure Billing Data API

I created a virtual machine on Azure. Are there any APIs, PowerShell scripts, or any other way to get the following information on my ASP.NET application report page.

  • Billing information for a separate virtual machine.
  • Uses data for a separate virtual machine.

thanks

+6
source share
5 answers

Windows Azure does not currently provide an invoicing / costing API. Amazon provides CloudWatch for this.

Windows Azure Pack (for on-premises / cloud SP using Hyper-V) has an API for cost accounting.

API is one of the most requested features of clients. See This Link http://feedback.windowsazure.com/forums/170030-billing/suggestions/1143971-billing-usage-api#comments

I believe Microsoft is working on an API. Therefore, at the moment, your only option is to download CSV. Microsoft recently added a feature that allows you to receive email alerts when monthly expenses or total costs reach the recruitment threshold.

+1
source

Now Azure gives customers the opportunity to get information about their use and pricing using the new Azure billing APIs: https://weblogs.asp.net/scottgu/new-azure-billing-apis-available

+5
source

The Azure Usage API can be called by customers and partners to retrieve granular Azure Resource Usage data (hourly and daily buckets), and the response from this REST API is JSON.

Here are some more useful links:

Azure Billing API High Level Article

Azure Usage API API Link

Github Azure Billing API Code Examples

If you have other questions, please email me at mobandyo@microsoft.com.

+1
source

I am waiting for the same features in the Azure API. I reported a request to the github function to export usage statistics as JSON. Probably the Azure team is working on it. If it is possible to obtain invoice data for a separate virtual machine, write to us about this function.

0
source

To get data on usage of Azure resources, there is also a new powershell batch file that you can use: get-UsageAggregates.

Example: Switch-AzureMode -Name AzureResourceManager

Add-AzureAccount Select-AzureSubscription "YOUR-AZURE-SUB-NAME" $agggregate = get-UsageAggregates -ReportedStartTime "5/2/2015" -ReportedEndTime "5/5/2015" 
0
source

Source: https://habr.com/ru/post/957649/


All Articles