Questions tagged [azure-billing-api]

Use this tag for questions related to Azure Billing APIs, which is used to pull usage and resource data into your preferred data analysis tools. The Azure Resource Usage and RateCard APIs can help you accurately predict and manage your costs. The APIs are implemented as a Resource Provider and part of the family of APIs exposed by the Azure Resource Manager.

Useful Links:

  1. MSDN
  2. Documentation
  3. Code samples - Github
120 questions
2
votes
1 answer

get azure subscription belongs to what type for example Pay As you Go, MCA, EA, CSP

I tried to fetch azure subscription belongs to what type for example Pay As you Go, MCA, EA, CSP by using REST API But I am not able to find the appropriate API for this case. I used Consumption Usage Details API, from this API response I am getting…
DAK
  • 282
  • 1
  • 18
2
votes
2 answers

In the azure consumption usage details api, what is the difference between the metric types actualcost, usagecost, and amortizedcost?

I went through this document but not able to get exact difference https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/understand-reserved-instance-usage-ea
DAK
  • 282
  • 1
  • 18
2
votes
2 answers

Azure Consumption Usage API - Filter Not Working

I have an issue trying to filter usages for Azure Consumption, as specified in the official documentation, based on: properties/resourceName eq '{resourceName} The complete URI is: $ConsumtionUsagesUri =…
bozx
  • 53
  • 4
2
votes
1 answer

Error message when creating query against Resource Manager, in Azure Monitor Workbook

I'm trying to add a query into a Workbook in Azure Monitor that queries for the month-to-date usage costs for my Azure subscription. When I construct the query and run it, I receive the following error message: BadRequest: Invalid query definition,…
user189198
2
votes
1 answer

Superimposing cost analysis for two different Azure subscriptions

Subscription cost analysis is useful but is there any way we can superimpose (produce comparative graph) of two subscription for which I am the owner?
Dhiraj
  • 3,396
  • 4
  • 41
  • 80
2
votes
1 answer

How to limit the usage of budget in azure

I have a resource group named XYZ on which I want to apply a budget and when the budget is used, I want the resource group to be frozen, i.e. no more transactions can be done from the resource group. If there any service in azure for the same or…
2
votes
2 answers

How to send Azure costs and usage data to log analytics workspace or directly to azure metrics?

I need to build a dashboard which will visuallize the usage and cost of many azure subscriptions. accounts, departments. My plan was: Send the data that is 'behind' the Azure Cost Analysis view, to the log analytics workspace. In the log analytics…
2
votes
1 answer

I need a powershell script/CLI/API that can calculate the running (upkeep) time of all the VMs (Windows & Linux) running on my Azure subscription

So, I have about six VMs (4 Linux & 2 Windows) running in an Azure subscription. I need to know how long the VMs have been running. How do I achieve this using a PowerShell/CLI/API?
Johnbosco
  • 65
  • 1
  • 9
2
votes
1 answer

Azure cost management access mystery

I am struggling to get the right access to Cost Management in Azure. I was provided billing reader access. But all we see is no access messages. What exactly is the purpose of billing reader? In the Cost Management + Billing - Overview, I see…
Blue Clouds
  • 7,295
  • 4
  • 71
  • 112
2
votes
0 answers

CORs error when attempting to retrieve Azure Authorization Code

I'm attempting to retrieve the Azure Authorisation code so that I can extract the access token in order to make calls to the Azure Billing API (RateCard and Usage APIs). I'm following the oauth protocol explained by Microsoft here. My…
raah
  • 158
  • 12
2
votes
1 answer

using Azure Billing REST API for Pre-consumption cost analysis

I am looking for Azure REST API that will help me calculate the cost of creating azure resources in advance. I got Azure Billing REST API. It certainly helps in getting the price of already created azure resources on monthly basis. But, I need it…
Rahul Mohan
  • 493
  • 3
  • 5
  • 18
2
votes
2 answers

How to use Management certificate based authentication for making REST API calls to Azure?

I am trying to get the usage and rate card information from Microsoft Azure using a java application and I came to understand that I can use the Management certificate to authenticate for making calls to Microsoft Azure. I got the Management…
jobin
  • 2,600
  • 7
  • 32
  • 59
2
votes
2 answers

Is there a Java SDK for Azure usage and billing API?

I came to know that Azure recently released their billing and usage API. I am aware of Azure's Java SDK, but did not find classes which will give me usage and billing data in the SDK docs. However, is there a Java SDK released for the same or should…
jobin
  • 2,600
  • 7
  • 32
  • 59
1
vote
1 answer

az rest command to get Usage Details for previous months/dates. (Microsoft.Consumption)

I have the following URL which is used to get the UsageDetails from Microsoft. consumption az rest --method GET --url…
1
vote
2 answers

azure amortized cost usagestart and usageend date error while passing it as variable

I am trying to pull azure amortized cost at subscription level but when I pass usage_start_date and usage_end_date in hardcoded way I am able to pull data : Example :…