How to get information about Azure using the API?

I tried to request the usage and billing API, which recently appeared in Azure, and saw that I can use the following API to get a tariff card:

https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId eq '{offer-id}' and Currency eq 'USD' and Locale eq 'en-US' and RegionInfo eq 'US' 

However, this requires that I be clearly familiar with the DurableId sentence that I learned for my case from the Azure site .

Is there an API that will give me these offer codes?

+4
source share
2 answers

AFAIK, there is no API to receive offer codes. In fact, if you look at the Billing API documentation here , they will also ask you to get information about this from the link you provided.

Install {OfferDurableId} in a valid offer code code (for example, MS-AZR-0026P). See Microsoft Azure Offer Details for more information on the list of available offer identifiers, country / region availability, and currency billing. The parameter "Offer number" consists of the prefix "MS-AZR-", plus the offer number.

Given that the offer code does not change, I think it’s somewhat safe to store this information in your own database

+3
source

One of the possibilities is as follows. But this is not documented or officially supported. This is the API that calls the Azure portal to receive offer information.

fooobar.com/questions/16533890 / ...

0
source

All Articles