Explore New Microsoft Azure Billing APIs

Yesterday, the Microsoft Azure team announced?the availability of the Azure Resource Usage and Rate Card API?that developers on the Azure platform can now leverage to programmatically retrieve usage and billing information. This feature will now allow enterprises in turn to charge their customers based on usage. This was long overdue for multi-tenant systems hosted on Azure and will allow accurate tracking of cloud spend and also make it more predictable to manage the cost of your operations on the cloud. Specifically, using the Billing API, there are two areas that you can query at your subscription level:

  1. Resource usage: The resource usage REST API allows you to get data consumption at a subscription level. The API acts as a resource provider as part of the Azure resource manager and you can use the role based access control features to allow/deny access to data. The URI you would call is the Usage Aggregates resource https://management.azure.com/subscriptions/{subscription-Id}/providers/Microsoft.Commerce/UsageAggregates. You need to pass the API version, report start and end date time. You need to also pass the granularity value as daily or hourly. What you will get back, amongst other things, is the usage start and end times representing the timestamp of the actual recorded usage, the meter category (storage or otherwise), meter subcategory representing if the storage is geo-redundant, and finally the quantity in units (typically GB). You can also send the show details flag as true in which case the response will also show the region and the project using the resource.
  2. Rate card: The rate card REST API allows you to fetch the pricing information by locale, currency, and region. The URI you would call is the Rate Card resource https://management.azure.com/subscriptions/{subscription-Id}/providers/Microsoft.Commerce/RateCard. The response will give you the meter rates (based on the currency specified in the input) for all the available meter categories like cloud services, networking, virtual machines, etc.

The API can be used against various scenarios such as finding the monthly spend, setup alerts if the usage varies against a specific threshold, and metering tenants based on usage.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may

man on floor with data

DevX Quick Guide to Data Ingestion

One of the biggest trends of the 21st century is the massive surge in internet usage. With major innovations such as smart technology, social media, and online shopping sites, the internet has become an essential part of everyday life for a large portion of the population. Due to this internet

payment via phone

7 Ways Technology Has Changed Traditional Payments

In today’s digital world, technology has changed how we make payments. From contactless cards to mobile wallets, it’s now easier to pay for goods and services without carrying cash or using a checkbook. This article will look at seven of the most significant ways technology has transformed traditional payment methods.