Azure - API to fetch current charges and billing cycle - azure

We can view the breakdown of the current charges from the Azure portal and the burn rate. Is there any API (apart from the RateCard and Utilization api) to fetch that? Instead of us calculating the cost, can we just fetch the actual cost per resource using API?
Secondly, is there any API to fetch the billing cycle for the subscription? I think we need Billing cycle to get the cost if there is tiered pricing on the resource and free usage in case we use rate and utilization API.

Related

Get Azure Resource Utilization by using azure COSTMANAGEMENT-API

Is there any way to get Cost and Utilization(CPU, Memory, DTU) trend of azure resources by using azure cost management apis.
If you check this Azure Cost Management documentation, then you will find that -
The Azure Cost Management APIs provide the ability to explore cost and usage data by creating customized filters and expressions allowing you to answer consumption-related questions for your Azure resources.
But note that these APIs are currently available for Azure Enterprise customers. So you can use it if you have the Enterprise Subscription.
To solve your problem you can use the Azure Consumption APIs. These APIs support Enterprise Enrollments and also some Web Direct Subscriptions. The Azure Consumption APIs give you programmatic access to cost and usage data for your Azure resources.
You should use Balances API, to get a monthly summary of information on balances, new purchases, Azure Marketplace service charges, adjustments, and overage charges.
And use Budgets API, to to create either cost or usage budgets for resources, resource groups, or billing meters.
Use the Usage Details API to get charge and usage data for all Azure 1st party resources you have.
Currently Balances API and Budgets API is only for Enterprise Customers only.

Daily billing status for CSP plan

we are using a subscription bought from an CSP. and we want to know daily billing and consumption . But CSP vendor says that we have to buy a 3rd party application to get daily billing consumption. Is there any way by which we can get daily billing consumption without 3rd party tool.?
It depends on your partner, is it a "Direct" or "Indirect".
If it is a direct partner then it has access to Azure Cost Management as explained here, and the can enable you to see retail price consumption here.
If it is an indirect partner then they should provide you a way to follow your consumption (through an in-house app, through a consumption export Excel file or any other communication you have agreed and signed with them as a customer).
Just as a reminder in CSP the Partner is responsible to bill accordingly and to explain your consumption, not Microsoft.

Azure Functions Pricing for Multiple Apps

I know that Azure Functions is free up to 1M executions and 400,000 GB-s every month.
Is this per function app per month?
If I have 3 function apps, does each get this allowance free each month?
As per the pricing page, this limit is combined for all Function Apps in an Azure Subscription.
Azure Functions consumption plan is billed based on per-second
resource consumption and executions. Consumption plan pricing includes
a monthly free grant of 1 million requests and 400,000 GB-s of
resource consumption per month per subscription in pay-as-you-go
pricing across all function apps in that subscription. Azure Functions
Premium plan provides enhanced performance and is billed on a per
second basis based on the number of vCPU-s and GB-s your Premium
Functions consume. Customers can also run Functions within their App
Service plan at regular App Service plan rates.

best options for a detailed azure invoice?

I need to provide a detailed invoice for Azure usage to a client. I'd like to be able to provide as granular of a breakdown as possible. For example, if an Azure cost of $10 was accrued for an App Service on one day, then I'd like to be able to provide the info on why that was, if that info is available. Was the cost due to a distributed allocation of a monthly cost? Was the cost due to a specific measure of ingress/egress? etc. This is my first time trying to provide a detailed invoice like this, so I'm sure that there are others here who have had the need to do this before who can probably provide some valuable insight on this.
You can see the cost breakdown under Cost Management in Azure Portal
In the Azure portal, navigate to cost analysis for your scope. For example: Cost Management + Billing > Cost Management > Cost analysis.
Select Cost by resource.
Change the view to Table.

Azure Rate Card reserved instance pricing

Is there an API provided by Azure providing information about Azure Rate Card pricing ?
The usual rate card doesn't seem to have any such information.
You could use Azure Billing APIs to predict and manage your costs, refer to this article.
Use Azure Billing APIs 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.
Azure Invoice Download API: download invoices
Azure Resource Usage API: get your estimated Azure consumption data
Azure Resource RateCard API: get the list of available Azure resources and estimated pricing information for each

Resources