Azure – Pricing API

This is a really nice feature – the Azure Pricing REST-API:

https://docs.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices

It pulls a structured JSON-Dataset for (not only) Virtual Machines out of the Azure-Webshop.

For example – the following filter:
https://prices.azure.com/api/retail/prices?$filter=serviceName eq ‚Virtual Machines‘ and priceType eq ‚Consumption‘ and endswith(armRegionName, ‚europe‘) and (startswith(skuName, ‚D‘) or startswith(skuName, ‚E‘) or startswith(skuName, ‚F‘) or startswith(skuName, ‚M‘)) and endswith(skuName,‘ Spot‘)
displays the price for only

  • „VMs“

with specific properties:

  • no Reservation
  • in „.*europe“-Locations
  • with Types „D.*“ or „E.*“ or „F.*“ or „M.*“
  • Spot-Intances

but – if you don’t want „Spot“ Instances, you’d guess this filter-Statement: https://prices.azure.com/api/retail/prices?$filter=serviceName eq ‚Virtual Machines‘ and priceType eq ‚Consumption‘ and endswith(armRegionName, ‚europe‘) and (startswith(skuName, ‚D‘) or startswith(skuName, ‚E‘) or startswith(skuName, ‚F‘) or startswith(skuName, ‚M‘)) and not endswith(skuName,‘ Spot‘)

to end with … and not endswith(skuName,‘ Spot‘) according to https://docs.microsoft.com/en-us/azure/search/search-query-odata-logical-operators but this breaks the call – the API returns :

{"Error":{"Code":"BadRequest","Message":"Invalid OData parameters supplied"}}

Microsoft Azure – Hyperthreading and Nested Virtualization

Go to https://docs.microsoft.com/en-us/azure/virtual-machines/acu and look for:

***Hyper-threaded and capable of running nested virtualization

The following „script“ pulls the SKUs out of the table:

wget -O - --no-check-certificate https://docs.microsoft.com/en-us/azure/virtual-machines/acu | egrep -B2 "\*\*\*" | egrep "data-linktype" | sed -E "s/^.+relative-path..([^\<]+).+$/SKU: \1/g"
C:\RH>echo "Hyper-threaded and capable of running nested virtualization" && wget -q -O - --no-check-certificate https://docs.microsoft.com/en-us/azure/virtual-machines/acu | egrep -B2 "\*\*\*" | egrep "data-linktype" | sed -E "s/^.+relative-path..([^\<]+).+$/SKU: \1/g"
"Hyper-threaded and capable of running nested virtualization"
SKU: D_v3
SKU: Ds_v3
SKU: Dv4
SKU: Dsv4
SKU: Ddv4
SKU: Ddsv4
SKU: E_v3
SKU: Es_v3
SKU: Ev4
SKU: Esv4
SKU: Edv4
SKU: Edsv4
SKU: F2s_v2 - F72s_v2
SKU: M

Next Step? Finding one with enough memory for an acceptable price.