How to fetch retail prices of instances from retail pricing API for instances with AHB option enabled?

Avisikta Patra 0 Reputation points
2023-02-08T14:30:34.12+00:00

i went to the MSFT retail price API page - (https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices)
I was trying to find retail prices of instances when AHB is enabled and I chose to do this assignment for VM - D64ds v5; so I hit tweaked the above API (https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'Virtual Machines' and armRegionName eq 'eastus' and armSkuName eq 'Standard_D64ds_v5') and hit it and found the response as pasted below:

{
  "BillingCurrency": "USD",
  "CustomerEntityId": "Default",
  "CustomerEntityType": "Retail",
  "Items": [
    {
      "currencyCode": "USD",
      "tierMinimumUnits": 0,
      "retailPrice": 3.616,
      "unitPrice": 3.616,
      "armRegionName": "eastus",
      "location": "US East",
      "effectiveStartDate": "2021-11-01T00:00:00Z",
      "meterId": "61e3a7f9-67e8-53c8-bdc6-d8624b9687b9",
      "meterName": "D64ds v5",
      "productId": "DZH318Z08MC5",
      "skuId": "DZH318Z08MC5/00HF",
      "availabilityId": null,
      "productName": "Virtual Machines Ddsv5 Series Windows",
      "skuName": "Standard_D64ds_v5",
      "serviceName": "Virtual Machines",
      "serviceId": "DZH313Z7MMC8",
      "serviceFamily": "Compute",
      "unitOfMeasure": "1 Hour",
      "type": "DevTestConsumption",
      "isPrimaryMeterRegion": true,
      "armSkuName": "Standard_D64ds_v5"
    },
    {
      "currencyCode": "USD",
      "tierMinimumUnits": 0,
      "retailPrice": 6.56,
      "unitPrice": 6.56,
      "armRegionName": "eastus",
      "location": "US East",
      "effectiveStartDate": "2021-11-01T00:00:00Z",
      "meterId": "61e3a7f9-67e8-53c8-bdc6-d8624b9687b9",
      "meterName": "D64ds v5",
      "productId": "DZH318Z08MC5",
      "skuId": "DZH318Z08MC5/00HF",
      "availabilityId": null,
      "productName": "Virtual Machines Ddsv5 Series Windows",
      "skuName": "Standard_D64ds_v5",
      "serviceName": "Virtual Machines",
      "serviceId": "DZH313Z7MMC8",
      "serviceFamily": "Compute",
      "unitOfMeasure": "1 Hour",
      "type": "Consumption",
      "isPrimaryMeterRegion": true,
      "armSkuName": "Standard_D64ds_v5"
    }
}
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,186 questions
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 23,646 Reputation points Microsoft Employee
    2023-02-18T22:07:12.4433333+00:00

    Hello, @Avisikta Patra !

    How do I find the Azure Hybrid Benefit (AHB) rates in the retail pricing API response?

    I'm still waiting on an official response but I wanted to share with you what I've found so far as a type of DevTestConsumption does appear to match the expected Azure Hybrid Benefit (AHB) rates I'm seeing in the Windows Virtual Machines Pricing page as long as skuName does not contain Spot or Low Priority.

    This holds true for the SKUs that I've tested for US East:

    • D64ds_v5 at 3.6160
    • D4ds_v5 at 0.2260
    • D16ds_v5 at 0.9040
    • B4ms at 0.1660
    • A8m_v2 at 0.4750
    • D16as_v5 at 0.6880
    • F32s_v2 at 1.3530
    • E32a_v4 at 2.0160

    I'll update you if I get official confirmation but for now, that appears to hold true.

    Resources:

    Example:

    https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'Virtual Machines' and armRegionName eq 'eastus' and armSkuName eq 'Standard_D64ds_v5'

    0 comments No comments