Share via


Get price and metadata information for resources used in an Azure subscription

Enables you to query for the resource/meter metadata and related prices used in a given subscription by:

  • Offer ID

  • Currency

  • Locale

  • Region

Important

The metadata associated with the billing meters, including but not limited to service names, types, resources, units of measure, and regions, is subject to change at any time and without notice. If you intend to use this billing data in an automated fashion, please use the billing meter GUID to uniquely identify each billable item. If the billing meter GUID is scheduled to change due to a new billing model, you will be notified in advance of the change.

Request

See the Common parameters and headers section in Resource RateCard (Preview) for headers and parameters that are used by all requests related to the Resource RateCard API.

Method Request URI
GET https://management.azure.com/subscriptions/{subscription-Id}/providers/Microsoft.Commerce/RateCard?api-version={api-version}&$filter=OfferDurableId eq ’{OfferDurableId}’ and Currency eq ’{Currency}’ and Locale eq ’{Locale}’ and RegionInfo eq ’{RegionInfo}’’
  • Set {OfferDurableId} to a valid Offer ID code (e.g., MS-AZR-0026P). See Microsoft Azure Offer Details for more information on the list of available Offer IDs, country/region availability, and billing currency. The Offer ID parameter consists of the “MS-AZR-“ prefix, plus the Offer ID number.

  • Set {Currency} to the currency in which the resource rates need to be provided.

  • Set {Locale} to the culture in which the resource metadata needs to be localized.

  • Set {RegionInfo} to the 2 letter ISO code where the offer was purchased.

Important

Please note that all 4 query parameters are required. Also, the $filter query option ONLY supports the ‘eq’ and ‘and’ logical operators at this time.

There is no request body.

Response

Important

The response will be a 302 Found response. When following this redirect please ensure you are not including an Authentication header, the URL contains a SAS token which is used to authorize the request.

Sample Responses

Below are examples of HTTP responses for various Offer IDs and regions, showing the request URL and substitution values for query parameters, as well as the corresponding JSON encoded response body.

The following example demonstrates a Pay-As-You-Go offer query on a given subscription, where OfferDurableId = ‘MS-AZR-0003p’ for the United States region (US), rates are returned in US Dollars (USD), and metadata is localized for the US English locale (en-US).

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

  
{  
   "OfferTerms": [],  
   "Meters": [  
      {  
         "MeterId": "1822fcc4-6059-4cbb-a132-54a187aaac46",  
         "MeterName": "Compute Hours",  
         "MeterCategory": "Virtual Machines",  
         "MeterSubCategory": "Basic_D6 VM (Non-Windows)",  
         "Unit": "Hours",  
         "MeterTags": [],  
         "MeterRates": {  
            "0": 3.136  
         },  
         "EffectiveDate": "2015-02-01T00:00:00Z",  
         "IncludedQuantity": 0.0  
      },  
      {  
         "MeterId": "3c5324ad-eb8c-44c6-af9a-6741ae75fc90",  
         "MeterName": "Data Transfer Out at 500 Mbps (GB)",  
         "MeterCategory": "Networking",  
         "MeterSubCategory": "ExpressRoute (IXP)",  
         "Unit": "GB",  
         "MeterTags": [],  
         "MeterRates": {  
            "0": 0.1  
         },  
         "EffectiveDate": "2014-08-01T00:00:00Z",  
         "IncludedQuantity": 2048.0  
      },  
  
      {  
         "MeterId": "9ee077eb-c902-46ef-b7f9-2caeade852e0",  
         "MeterName": "Compute Hours",  
         "MeterCategory": "Cloud Services",  
         "MeterSubCategory": "A6 Cloud Services",  
         "Unit": "Hours",  
         "MeterTags": [],  
         "MeterRates": {  
           "0": 0.71  
         },  
         "EffectiveDate": "2013-12-01T00:00:00Z",  
         "IncludedQuantity": 0.0  
      },  
   …     
   ]  
   "Currency": "USD",  
   "Locale": "en-US",  
   "IsTaxIncluded": false,  
   "MeterRegion": "US West",  
   "Tags": []   
}  
  

The following example demonstrates the same Pay-As-You-Go query as the previous one, but using version=2016-08-31-preview, showing two "Active" meters and one "Deprecated" meter.

https://management.azure.com/subscriptions/{subscription-Id}/providers/Microsoft.Commerce/RateCard?api-version=2016-08-31-preview&$filter=OfferDurableId eq ’MS-AZR-0003p’ and Currency eq ’USD’ and Locale eq ’en-US’ and RegionInfo eq ’US’

  
{  
   "OfferTerms": [],  
   "Meters": [  
      {  
         "MeterId": "1822fcc4-6059-4cbb-a132-54a187aaac46",  
         "MeterName": "Compute Hours",  
         "MeterCategory": "Virtual Machines",  
         "MeterSubCategory": "Basic_D6 VM (Non-Windows)",  
         "Unit": "Hours",  
         "MeterTags": [],  
         "MeterRates": {  
            "0": 3.136  
         },  
         "EffectiveDate": "2015-02-01T00:00:00Z",  
         "IncludedQuantity": 0.0,  
         "MeterStatus": "Active"  
      },  
      {  
         "MeterId": "3c5324ad-eb8c-44c6-af9a-6741ae75fc90",  
         "MeterName": "Data Transfer Out at 500 Mbps (GB)",  
         "MeterCategory": "Networking",  
         "MeterSubCategory": "ExpressRoute (IXP)",  
         "Unit": "GB",  
         "MeterTags": [],  
         "MeterRates": {  
            "0": 0.1  
         },  
         "EffectiveDate": "2014-08-01T00:00:00Z",  
         "IncludedQuantity": 2048.0,  
         "MeterStatus": "Active"  
      },  
  
      {  
         "MeterId": "9ee077eb-c902-46ef-b7f9-2caeade852e0",  
         "MeterName": "Compute Hours",  
         "MeterCategory": "Cloud Services",  
         "MeterSubCategory": "A6 Cloud Services",  
         "Unit": "Hours",  
         "MeterTags": [],  
         "MeterRates": {  
           "0": 0.71  
         },  
         "EffectiveDate": "2013-12-01T00:00:00Z",  
         "IncludedQuantity": 0.0,  
         "MeterStatus": "Deprecated"  
       },  
   …     
   ]  
   "Currency": "USD",  
   "Locale": "en-US",  
   "IsTaxIncluded": false,  
   "MeterRegion": "US West",  
   "Tags": []   
}  
  

The following example demonstrates a Monetary Commitment offer query on a given subscription, where OfferDurableId = ‘MS-AZR-0037p’ for the United States region (US), rates are returned in US Dollars (USD), and metadata is localized for the US English locale (en-US).

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

  
{  
   "OfferTerms": [  
      {  
      "Name": "Monetary Commitment",  
      "TieredDiscount": {  
         "500": 0.2,  
         "15000": 0.23,  
         "40000": 0.27  
      },  
      "ExcludedMeterIds": [],  
      "EffectiveDate": "2013-11-01T00:00:00Z"  
      }  
   ],  
   "Meters": [  
      {  
         "MeterId": "1822fcc4-6059-4cbb-a132-54a187aaac46",  
         "MeterName": "Compute Hours",  
         "MeterCategory": "Virtual Machines",  
         "MeterSubCategory": "Basic_D6 VM (Non-Windows)",  
         "Unit": "Hours",  
         "MeterTags": [],  
         "MeterRates": {  
            "0": 3.136  
         },  
         "EffectiveDate": "2015-02-01T00:00:00Z",  
         "IncludedQuantity": 0.0  
      },  
      {  
         "MeterId": "3c5324ad-eb8c-44c6-af9a-6741ae75fc90",  
         "MeterName": "Data Transfer Out at 500 Mbps (GB)",  
         "MeterCategory": "Networking",  
         "MeterSubCategory": "ExpressRoute (IXP)",  
         "Unit": "GB",  
         "MeterTags": [],  
         "MeterRates": {  
            "0": 0.1  
         },  
         "EffectiveDate": "2014-08-01T00:00:00Z",  
         "IncludedQuantity": 2048.0  
      },  
  
      {  
         "MeterId": "9ee077eb-c902-46ef-b7f9-2caeade852e0",  
         "MeterName": "Compute Hours",  
         "MeterCategory": "Cloud Services",  
         "MeterSubCategory": "A6 Cloud Services",  
         "Unit": "Hours",  
         "MeterTags": [],  
         "MeterRates": {  
            "0": 0.71  
      },  
      "EffectiveDate": "2013-12-01T00:00:00Z",  
      "IncludedQuantity": 0.0  
    },  
   …     
   ]  
   "Currency": "USD",  
   "Locale": "en-US",  
   "IsTaxIncluded": false,  
   "MeterRegion": "US West",  
   "Tags": []   
}  
  

The following example demonstrates a Monetary Credit offer query on a given subscription, where OfferDurableId = ‘MS-AZR-0121p’ for the United States region (US), rates are returned in US Dollars (USD), and metadata is localized for the US English locale (en-US).

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

  
{  
   "OfferTerms": [  
      {  
         "Name": "Monetary Credit",  
         "Credit": 500.0,  
         "ExcludedMeterIds": [  
            "c7c86eef-7094-47d5-83e7-c3c9be5af0bf",  
            "4b8b8092-a2d7-4785-9b9f-76104f4c7269",  
            "7e266189-fb95-4615-af5b-126a00e78714",  
            "20f1b323-0950-4527-b4f3-d77e2b7aca16"  
         ],  
         "EffectiveDate": "2014-04-01T00:00:00Z"  
      }  
   ],  
   "Meters": [  
      {  
         "MeterId": "1822fcc4-6059-4cbb-a132-54a187aaac46",  
         "MeterName": "Compute Hours",  
         "MeterCategory": "Virtual Machines",  
         "MeterSubCategory": "Basic_D6 VM (Non-Windows)",  
         "Unit": "Hours",  
         "MeterRates": {  
            "0": 3.136  
         },  
         "EffectiveDate": "2015-02-01T00:00:00Z",  
         "IncludedQuantity": 0.0  
      },  
      {  
         "MeterId": "3c5324ad-eb8c-44c6-af9a-6741ae75fc90",  
         "MeterName": "Data Transfer Out at 500 Mbps (GB)",  
         "MeterCategory": "Networking",  
         "MeterSubCategory": "ExpressRoute (IXP)",  
         "Unit": "GB",  
         "MeterRates": {  
            "0": 0.1  
         },  
         "EffectiveDate": "2014-08-01T00:00:00Z",  
         "IncludedQuantity": 0.0  
      },  
      {  
         "MeterId": "9ee077eb-c902-46ef-b7f9-2caeade852e0",  
         "MeterName": "Compute Hours",  
         "MeterCategory": "Cloud Services",  
         "MeterSubCategory": "A6 Cloud Services",  
         "Unit": "Hours",  
         "MeterRates": {  
            "0": 0.71  
         },  
         "EffectiveDate": "2013-12-01T00:00:00Z",  
         "IncludedQuantity": 0.0  
      },  
      …  
   ]  
   "Currency": "USD",  
   "Locale": "en-US",  
   "IsTaxIncluded": false,  
   "MeterRegion": "US West",  
   "Tags": []   
}  
  

The following example is the same as the one above, but using OfferDurableId = ‘MS-AZR-0121p’ for the Germany region (DE), rates are returned in Euros (EUR), and metadata is localized for the Germany locale (de-DE)..

https://management.azure.com/subscriptions/{subscription-Id}/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId eq ’MS-AZR-0121p’ and Currency eq ’EUR’ and Locale eq ’de-DE’ and RegionInfo eq ’DE’

  
{  
   "OfferTerms": [  
   {  
   "Name": "Monetary Credit",  
   "Credit": 375.0,  
   "ExcludedMeterIds": [  
      "c7c86eef-7094-47d5-83e7-c3c9be5af0bf",  
      "4b8b8092-a2d7-4785-9b9f-76104f4c7269",  
      "7e266189-fb95-4615-af5b-126a00e78714",  
      "20f1b323-0950-4527-b4f3-d77e2b7aca16"  
      ],  
      "EffectiveDate": "2014-04-01T00:00:00Z"  
   }  
   ],  
   "Meters": [  
   {  
      "MeterId": "1822fcc4-6059-4cbb-a132-54a187aaac46",  
      "MeterName": "Rechenstunden",  
      "MeterCategory": "Virtual Machines",  
      "MeterSubCategory": "Basic_D6 VM (Nicht-Windows)",  
      "Unit": "Stunden",  
      "MeterRates": {  
         "0": 2.3353792  
      },  
      "EffectiveDate": "2015-02-01T00:00:00Z",  
      "IncludedQuantity": 0.0  
   },  
   {  
      "MeterId": "3c5324ad-eb8c-44c6-af9a-6741ae75fc90",  
      "MeterName": "Datenübertragungen ausgehend bei 500 Mbit/s (GB)",  
      "MeterCategory": "Networking",  
      "MeterSubCategory": "ExpressRoute (IXP)",  
      "Unit": "GB",  
      "MeterRates": {  
         "0": 0.07447  
      },  
      "EffectiveDate": "2014-08-01T00:00:00Z",  
      "IncludedQuantity": 0.0  
   },  
   {  
      "MeterId": "9ee077eb-c902-46ef-b7f9-2caeade852e0",  
      "MeterName": "Rechenstunden",  
      "MeterCategory": "Cloud Services",  
      "MeterSubCategory": "A6 – Cloud Services",  
      "Unit": "Stunden",  
      "MeterRates": {  
         "0": 0.528737  
      },  
      "EffectiveDate": "2013-12-01T00:00:00Z",  
      "IncludedQuantity": 0.0  
   },  
   …  
   ]    
   "Currency": "EUR",  
   "Locale": "de-DE",  
   "IsTaxIncluded": false,  
   "MeterRegion": "EU West",  
   "Tags": []     
}  
  

JSON Element Definitions

Below is the list of possible JSON data elements you will find in the HTTP response body.

Element Name Description
Credit The amount of credit provided under the terms of the given offer level. This field is used only by offer terms of type “Monetary Commitment”.
Currency The currency in which the rates are provided.
EffectiveDate Indicates the date from which the meter rate or offer term is effective.
ExcludedMeterIds An array of meter ids that are excluded from the given offer terms.
IncludedQuantity The resource quantity that is included in the offer at no cost. Consumption beyond this quantity will be charged.
IsTaxIncluded All rates are pretax, so this will always be returned as “false”.
Locale The culture in which the resource information is localized.
MeterCategory The category of the meter, e.g., “Cloud services”, “Networking”, etc..
MeterId The unique identifier of the resource.
MeterName The name of the meter, within the given meter category.
MeterRates The list of key/value pairs for the meter rates, in the format “key”:”value” where key = the meter quantity, and value = the corresponding price.
MeterRegion The region in which the Azure service is available.
MeterSubCategory The subcategory of the meter, e.g., “A6 Cloud services”, “ExpressRoute (IXP)”, etc..
MeterStatus Indicates whether the MeterId is "Active" or "Deprecated".
Name The name of the Azure offer term, e.g., “Monetary Credit”.
ServiceRegion The region in which the Azure service is available.
Tags Provides additional meter data.

“Third Party” indicates a meter with no discount. Blanks indicate First Party.
TieredDiscount The list of key/value pairs for the tiered meter rates, in the format “key”:”value” where key = price, and value = the corresponding discount percentage. This field is used only by offer terms of type “Monetary Commitment”.
Unit The unit in which the meter consumption is charged, e.g., “Hours”, “GB”, etc.

Response Codes

HTTP Status Code Error Code Description
200/OK n/a Normal response for a successful query. The response body will contain the data that matches the filters specified in the query parameters.
400/Bad Request InvalidApiVersion The api-version query parameter provided is either not supported, or formatted incorrectly.
400/Bad Request InvalidProperty A property was missing or had an unacceptable value. The corresponding “message” that accompanies the error “code” in the response body will clarify the offending property.
400/Bad Request NoApiVersion The api-version query parameter is missing.
401/Unauthorized AuthenticationFailed Typically this is caused by using an access token that is invalid or expired. The corresponding “message” that accompanies the error “code” in the response body will clarify. See Authenticating Azure Resource Manager requests for details on obtaining and specifying a secure access token.
401/Unauthorized MissingAuthorization The authorization header is missing or incomplete. See Authenticating Azure Resource Manager requests for details on obtaining and specifying a secure access token.
404/Not Found InvalidResourceType The version passed in the api-version parameter is incorrect. The corresponding “message” that accompanies the error “code” in the response will clarify.
404/Not Found ObjectNotFound The client does not own the entitlement.
404/Not Found SubscriptionNotFound The subscription-Id value passed in the request URL is invalid or not found.

See Also

Resource Usage (Preview)
Azure Billing Usage and RateCard APIs Overview