question

AnastasiiaIlina-5956 avatar image
0 Votes"
AnastasiiaIlina-5956 asked SadiqhAhmed-MSFT commented

Azure Retail Pricing API shows different USD prices for Virtual Machines compared to the prices on azure.microsoft.com/en-us/pricing/calculator/


I would like to get the price of the VM via the Pricing API, but when I compare this price with the price on the pricing/calculator and on the portal - the API price is different. 127919-pricing-calculator.png



When I call the Pricing API by https://prices.azure.com/api/retail/prices?currencyCode='USD'&$filter=armSkuName eq 'Standard_D4s_v3' and armRegionName eq 'westus' and priceType eq 'Consumption'
I expect to get the same result, but it is different:
{
"BillingCurrency": "USD",
"CustomerEntityId": "Default",
"CustomerEntityType": "Retail",
"Items": [
{
"currencyCode": "USD",
"tierMinimumUnits": 0.0,
"retailPrice": 0.074786,
"unitPrice": 0.074786,
"armRegionName": "westus",
"location": "US West",
"effectiveStartDate": "2021-08-01T00:00:00Z",
"effectiveEndDate": "2021-08-31T23:59:00Z",
"meterId": "4495574c-fccf-5c8c-8190-2c822a0c7e6f",
"meterName": "D4s v3 Spot",
"productId": "DZH318Z0BQ50",
"skuId": "DZH318Z0BQ50/01T3",
"productName": "Virtual Machines DSv3 Series",
"skuName": "D4s v3 Spot",
"serviceName": "Virtual Machines",
"serviceId": "DZH313Z7MMC8",
"serviceFamily": "Compute",
"unitOfMeasure": "1 Hour",
"type": "Consumption",
"isPrimaryMeterRegion": true,
"armSkuName": "Standard_D4s_v3"
},
{
"currencyCode": "USD",
"tierMinimumUnits": 0.0,
"retailPrice": 0.187013,
"unitPrice": 0.187013,
"armRegionName": "westus",
"location": "US West",
"effectiveStartDate": "2021-08-01T00:00:00Z",
"effectiveEndDate": "2021-08-31T23:59:00Z",
"meterId": "947dfc0d-a1a2-5f28-bdbc-8e788b79185b",
"meterName": "D4s v3 Spot",
"productId": "DZH318Z0BPWD",
"skuId": "DZH318Z0BPWD/0117",
"productName": "Virtual Machines DSv3 Series Windows",
"skuName": "D4s v3 Spot",
"serviceName": "Virtual Machines",
"serviceId": "DZH313Z7MMC8",
"serviceFamily": "Compute",
"unitOfMeasure": "1 Hour",
"type": "Consumption",
"isPrimaryMeterRegion": true,
"armSkuName": "Standard_D4s_v3"
}
],
"NextPageLink": null,
"Count": 2
}

I will be grateful for your help. Thank you!

azure-cost-management
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SadiqhAhmed-MSFT avatar image
1 Vote"
SadiqhAhmed-MSFT answered

@AnastasiiaIlina-5956 - The API response you pasted above are for spot pricing (highlighted below).


I did a quick check for the meter that has 0.234 price point in west US – and I think D4 v3 and D4s v3 both emit the same meterId. Meter Ids are reliable way to triangulate the price point for reconciliation point of view. Can you please explain what you are trying to do between the ACOM pricing experiences and the API response?


https://prices.azure.com/api/retail/prices?currencyCode=%27USD%27&$filter=armRegionName eq %27westus%27 and priceType eq %27Consumption%27 and retailPrice eq 0.234
{
"BillingCurrency": "USD",
"CustomerEntityId": "Default",
"CustomerEntityType": "Retail",
"Items": [
{
"currencyCode": "USD",
"tierMinimumUnits": 0,
"retailPrice": 0.234,
"unitPrice": 0.234,
"armRegionName": "westus",
"location": "US West",
"effectiveStartDate": "2017-07-21T00:00:00Z",
"meterId": "8462aa11-a392-4ae4-87cf-2dbabe31d487",
"meterName": "D4 v3/D4s v3",
"productId": "DZH318Z0BQ4K",
"skuId": "DZH318Z0BQ4K/00ST",
"productName": "Virtual Machines Dv3 Series",
"skuName": "D4 v3",
"serviceName": "Virtual Machines",
"serviceId": "DZH313Z7MMC8",
"serviceFamily": "Compute",
"unitOfMeasure": "1 Hour",
"type": "Consumption",
"isPrimaryMeterRegion": true,
"armSkuName": "Standard_D4_v3"
}
],
"NextPageLink": null,
"Count": 1
}


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.