Azure Retail Prices API Azure SQL Database

Rafal Fraczek 60 Reputation points
2023-06-12T19:11:27.8666667+00:00

Hello,

I am using bellow API call to read price for Azure SQL Databse service:

https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'SQL Database' and location eq 'EU West' and productName eq 'SQL Database SingleDB/Elastic Pool Hyperscale - Compute Gen5' and skuName eq '2 vCore'

I got below response:

{
            "currencyCode": "USD",
            "tierMinimumUnits": 0.0,
            "retailPrice": 0.401852,
            "unitPrice": 0.401852,
            "armRegionName": "westeurope",
            "location": "EU West",
            "effectiveStartDate": "2019-07-01T00:00:00Z",
            "meterId": "0443a95d-d288-4277-9edb-97dcae9a9491",
            "meterName": "vCore",
            "productId": "DZH318Z0BXXX",
            "skuId": "DZH318Z0BXXX/003B",
            "productName": "SQL Database SingleDB/Elastic Pool Hyperscale - Compute Gen5",
            "skuName": "2 vCore",
            "serviceName": "SQL Database",
            "serviceId": "DZH3180HX10K",
            "serviceFamily": "Databases",
            "unitOfMeasure": "1 Hour",
            "type": "Consumption",
            "isPrimaryMeterRegion": false,
            "armSkuName": "SQLDB_HS_Compute_Gen5_2"
        }

What configuration in Azure Calculator https://azure.microsoft.com/en-us/pricing/calculator/does this price apply to? I have tried multiple configuration, but I am not able to find it.

For sure config in Azure Calculator are:

Region: EU West

Type: Single Database

Purchase Model: vCore

Service Tier: General Purpose

Compute tier: Provisioned

Hardware Type: Standard-Series (Gen 5)

Instance: 2 vCore

What about other values?

Thanks in advance

Azure SQL Database
Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
3,577 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. SadiqhAhmed-MSFT 49,326 Reputation points Microsoft Employee Moderator
    2023-06-19T14:23:02.8+00:00

    Hello @Rafal Fraczek Thank you for posting your question on Microsoft Q&A platorm!

    This API GET https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'SQL Database' and location eq 'EU West' and productName eq 'SQL Database SingleDB/Elastic Pool Hyperscale - Compute Gen5' and skuName eq '2 vCore' is giving the 2vcore cost for the SQL DB hyperscale compute Gen5 cost for hardware only.

    In pricing calculator, this is the config which will show the same price which matches the above retail price API:

    CostMgmt.png

    The license software cost is billed on a separate meter and for that you can call this retail price API https://prices.azure.com/api/retail/prices?$filter=productName eq 'SQL Database SingleDB/Elastic Pool Hyperscale - SQL License' and priceType eq 'Consumption' and armRegionName eq 'Global'.

    In this API response, you will get 1 vcore cost and you multiple the same with 2 for 2vcore license charge hourly.

    Hope this helps!


    If the response helped, do "Accept Answer" and up-vote it

    1 person found this answer helpful.

  2. AirGordon 7,150 Reputation points
    2023-06-13T09:01:26.4333333+00:00

    You're selecting the incorrect service tier in the pricing calculator, everything else looks fine.

    If you look at the Json you pasted, the armSkuName provides some valuable information SQLDB_HS_Compute_Gen5_2 "HS" denotes Hyperscale;

    enter image description here


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.