How do I get retail pricing for Dedicated Hosts?

Keri Wheatley 20 Reputation points
2023-04-21T13:19:16.11+00:00

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

Azure Dedicated Host
Azure Dedicated Host
An Azure service that provides a dedicated physical server to host Azure virtual machines for Windows and Linux.
48 questions
{count} votes

Accepted answer
  1. KarishmaTiwari-MSFT 18,632 Reputation points Microsoft Employee
    2023-04-25T22:51:20.33+00:00

    @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 person found this answer helpful.

0 additional answers

Sort by: Most helpful