How do I get retail pricing for Dedicated Hosts?

Keri Wheatley 20 Reputation points

I am using the Azure Retail Price API and I can't figure out the filters required to get pricing for Azure Dedicated Host. How can I get those prices? https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices

  1. KarishmaTiwari-MSFT 20,862 Reputation points β€’ Microsoft Employee β€’ Moderator

    @Anonymous I am looking into it and will get back in sometime. Thanks.

  2. KarishmaTiwari-MSFT 20,862 Reputation points β€’ Microsoft Employee β€’ Moderator

    @Anonymous Checking in to see if the answer below helped.

    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer below has been helpful, please don’t forget to Accept Answer and hit 'Yes' for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members for remediation for similar issues.

    πŸ‘ User's image

    πŸ‘ User's image


Sign in to comment

Answer accepted by question author

KarishmaTiwari-MSFT 20,862 Reputation points β€’ Microsoft Employee β€’ Moderator

@Anonymous Thanks for posting your query on Microsoft Q&A.

Q: You are trying to use Azure Retail Pricing API for Dedicated Hosts and need help with what filters to apply with the API endpoint.

A: Here is an example of how you can get the Retail pricing for Azure Dedicated Host using Azure Retail Pricing API:

http https://prices.azure.com/api/retail/prices?$filter=productName eq 'Easv4 Series Dedicated Host' 

You will need to use productName filter, (which in the example above) will result in Retail Pricing data for Easv4 series dedicated host for all regions and all reservation terms.

Similarly, you can add the armRegionName filter to look for pricing details for a particular region you are interested in:

https://prices.azure.com/api/retail/prices?$filter=productName eq 'Easv4 Series Dedicated Host' and armRegionName eq 'eastus'

The output when formatted in JSON will look like this:

{
 "BillingCurrency": "USD",
 "CustomerEntityId": "Default",
 "CustomerEntityType": "Retail",
 "Items": [
 {
 "currencyCode": "USD",
 "tierMinimumUnits": 0,
 "retailPrice": 6.653,
 "unitPrice": 6.653,
 "armRegionName": "eastus",
 "location": "US East",
 "effectiveStartDate": "2022-03-01T00:00:00Z",
 "meterId": "0b812d2e-4317-5883-b93e-2449d58a2a30",
 "meterName": "Easv4 Type2",
 "productId": "DZH318Z0CXSZ",
 "skuId": "DZH318Z0CXSZ/00DX",
 "availabilityId": null,
 "productName": "Easv4 Series Dedicated Host",
 "skuName": "Easv4 Type2",
 "serviceName": "Virtual Machines",
 "serviceId": "DZH313Z7MMC8",
 "serviceFamily": "Compute",
 "unitOfMeasure": "1 Hour",
 "type": "Consumption",
 "isPrimaryMeterRegion": true,
 "armSkuName": "Easv4_Type2"
 },
 {
 "currencyCode": "USD",
 "tierMinimumUnits": 0,
 "reservationTerm": "3 Years",
 "retailPrice": 69934,
 "unitPrice": 69934,
 "armRegionName": "eastus",
 "location": "US East",
 "effectiveStartDate": "2022-03-01T00:00:00Z",
 "meterId": "0b812d2e-4317-5883-b93e-2449d58a2a30",
 "meterName": "Easv4 Type2",
 "productId": "DZH318Z0CXSZ",
 "skuId": "DZH318Z0CXSZ/00G8",
 "availabilityId": null,
 "productName": "Easv4 Series Dedicated Host",
 "skuName": "Easv4 Type2",
 "serviceName": "Virtual Machines",
 "serviceId": "DZH313Z7MMC8",
 "serviceFamily": "Compute",
 "unitOfMeasure": "1 Hour",
 "type": "Reservation",
 "isPrimaryMeterRegion": true,
 "armSkuName": "Easv4_Type2"
 },

Similarly, you can apply other filters like priceType eq 'Reservation' and so on, to achieve the desired outputs.

API sample calls here: https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices#api-sample-calls

You can find the Azure Dedicated Hosts to be used here for 'product name' filter here: https://learn.microsoft.com/en-us/azure/virtual-machines/dedicated-host-general-purpose-skus

If you have any questions, please let me know in the "comments" and I would be happy to help you. Comment is the fastest way of notifying the experts.

If this helps, please 'Accept answer' and hit 'Yes' for 'was this ans helpful' so that it can help others in the community looking for help on the same topic.

  1. Keri Wheatley 20 Reputation points

    Thank you @

  2. KarishmaTiwari-MSFT 20,862 Reputation points β€’ Microsoft Employee β€’ Moderator

    Thanks for the update. Glad to know it was helpful.


Sign in to comment

0 additional answers

Sign in to answer

Your answer