Hello @Kieran Pierce Thank you for reaching out to us on Microsoft Q&A platform. Happy to help!
To get the price for a disk using the Azure Retail price API, you can use the following steps:
- Determine the SKU of the disk you want to price. You can find this information in the Azure portal or by using the Azure CLI or PowerShell.
- Use the Azure Retail price API to retrieve the price for the SKU. The API endpoint is
https://prices.azure.com/api/retail/prices
. You can use the following query parameters to filter the results:
-
$filter
: Use this parameter to filter the results based on the SKU. The syntax for the filter issku eq '{sku}'
. -
$top
: Use this parameter to limit the number of results returned. In this case, you only need one result, so you can set$top=1
. Here's an example of how to use the Azure Retail price API to retrieve the price for a disk SKU:
GET https://prices.azure.com/api/retail/prices?$filter=sku eq 'sku-of-disk'&$top=1
Make sure to replace sku-of-disk
with the actual SKU of the disk you want to price. The API will return a JSON object that includes the price information for the SKU, including the currency, unit of measure, and price per unit.
Note that the Azure Retail price API provides retail prices, which are list prices and may not reflect any discounts or special pricing that you may be eligible for. If you have an Azure subscription, you can also use the Azure Pricing calculator to estimate the cost of your resources based on your specific configuration and pricing plan.
If the response helped, do "Accept Answer" and up-vote it