Skip to main content

sc_crawler.vendors._azure

Inventory of Microsoft Azure via its APIs: servers, storages, traffic, IPv4 addresses and managed PostgreSQLPostgreSQLAn open-source object-relational database system, developed by a global community and descended from the POSTGRES project at UC Berkeley in 1986. It uses and extends SQL, with transactions, many index types, extensions, and JSON data.PostgreSQL docsGlossary (Flexible Server), with their prices.

Functions:

  • inventory_compliance_frameworks – Manual list of known compliance frameworks at Azure.
  • inventory_regions – List all regionsregionA geographic area where a cloud vendor runs its data centers, such as Frankfurt or Northern Virginia, made up of one or more availability zones. A server type is offered in some regions only, and its price can differ by region; a region's ID, such as eu-central-1, is unique only within its vendor.Glossary via APIAPI: Application Programming InterfaceA defined set of requests and responses through which one program uses another, such as a web service's HTTP endpoints or a library's functions.WikipediaGlossary call.
  • inventory_zones – List all availability zonesavailability zoneOne or more isolated data centers within a cloud region, with their own power, cooling and network. A server runs in one zone; spreading servers over several zones of a region keeps a service up when one zone fails. Prices and the server types on offer can differ by zone.AWS docsGlossary.
  • inventory_servers – List all available instance types in all regions.
  • inventory_server_prices – List all known server ondemandon-demandA pricing model of cloud servers that charges for the time a server runs, without a commitment, typically per second or hour. The server runs until you stop it, unlike a spot instance, but it costs more than spot or reserved capacity.Glossary prices in all regions using the Azure Retail Pricing API.
  • inventory_server_prices_spot – List all known server spot pricesspot instanceA cloud server that runs on the vendor's spare capacity, at a large discount from its on-demand price, but which the vendor can stop or take back at short notice when it needs the capacity. Spot prices change with the demand, e.g. several times a day.AWS docsGlossary in all regions using the Azure Retail Pricing API.
  • inventory_storages – List all storage options via the Compute resource manager client.
  • inventory_storage_prices – Look up Storage prices via the Azure Retail Prices API.
  • inventory_traffic_prices – Look up Internet Egress/Ingress prices via the Azure Retail Prices API.
  • inventory_ipv4_prices – Look up Internet Egress/Ingress prices via the Azure Retail Prices API.
  • inventory_databases – List Azure Database for PostgreSQL Flexible Server types in all regions.
  • inventory_database_prices – List Azure Database for PostgreSQL Flexible Server on-demand prices from the Retail Pricing API.
  • inventory_database_storages – List all Azure Database for PostgreSQL Flexible Server storage options via the capabilities API.
  • inventory_database_storage_prices – Look up Azure Database for PostgreSQL Flexible Server storage prices via the Azure Retail Prices API.

Attributes:

attr SERVER_FEATURES _azure.py:555–580⁠ (opens in a new tab)​

SERVER_FEATURES = {'a': 'AMD processor', 'p': 'ARM processor', 'b': 'Block Storage performance', 'd': 'Local Disk', 'i': 'Isolated', 'l': 'Low Memory', 'm': 'Memory Intensive', 'n': 'Network Optimized', 't': 'Tiny Memory', 's': 'Premium Storage capable', 'r': 'RDMA capable', 'e': 'Memory Optimized', 'x': 'Unmatched Memory Capacity', 'o': 'o'}

Map lowercase chars from the server name to features.

attr STORAGE_PRICE_UNIT_MAPPING _azure.py:604–610⁠ (opens in a new tab)​

STORAGE_PRICE_UNIT_MAPPING: dict[str, float | None] = {'1/Month': None, '1 GiB/Month': 1 / _GIB_TO_GB, '1 GB/Month': 1.0, '1 GiB/Hour': _HOURS_PER_MONTH / _GIB_TO_GB, '1 GB/Hour': _HOURS_PER_MONTH}

Storage capacity units → multiplier to convert the raw API price to $/GB/month.

func inventory_compliance_frameworks _azure.py:1295–1302⁠ (opens in a new tab)​

inventory_compliance_frameworks(vendor)

Manual list of known compliance frameworks at Azure.

Data collected from https://learn.microsoft.com/en-us/azure/compliance/⁠ (opens in a new tab).

func inventory_regions _azure.py:1305–1830⁠ (opens in a new tab)​

inventory_regions(vendor)

List all regions via API call.

Location (country and state) and founding year were collected manually from https://datacenters.microsoft.com/globe/explore/⁠ (opens in a new tab) and its underlying JSONJSON: JavaScript Object NotationA text format for structured data, built from objects (key-value pairs), arrays, strings, numbers, booleans, and null. Most languages and tools read and write it, which makes it a common format for API responses and benchmark output.JSONGlossary at https://datacenters.microsoft.com/globe/data/geo/regions.json⁠ (opens in a new tab).

City and the energy source information was collected from the sustainability fact sheets referenced in the above page and JSON.

Coordinates were provided by the Microsoft API, which doesn't seem to be very reliable.

Some regions are restricted to specific customer scenarios, such as disaster recovery within a geography (e.g. australiacentral2, brazilsoutheast, germanynorth, norwaywest, southafricawest, uaecentral, swedensouth), see https://learn.microsoft.com/en-us/azure/reliability/regions-list⁠ (opens in a new tab). These are listed if visible to the subscription, but services and SKUsSKU: Stock Keeping UnitAn identifier of a product a vendor sells, e.g. a server type, or a component that its price is built from, such as a vCPU or a GB of memory in a region. Cloud vendors' price lists are made of SKUs, which the Crawler combines into the price of each server type.Glossary are usually not available there without a region access request: https://learn.microsoft.com/en-us/troubleshoot/azure/general/region-access-request-process⁠ (opens in a new tab).

func inventory_zones _azure.py:1833–1867⁠ (opens in a new tab)​

inventory_zones(vendor)

List all availability zones.

API call to list existing availability zones ("1", "2", and "3") for each region, and creating a dummy "0" zone for the regions without availability zones.

func inventory_servers _azure.py:1870–1898⁠ (opens in a new tab)​

inventory_servers(vendor)

List all available instance types in all regions.

Lifecycle: the retirement date of _azure_sku_retirement_date (API, then _AZURE_RETIREMENT_RULES) is stored in retirement_date — RETIRED if it has passed, PLANNED_FOR_RETIREMENT if not yet, otherwise ACTIVE.

func inventory_server_prices _azure.py:1901–1906⁠ (opens in a new tab)​

inventory_server_prices(vendor)

List all known server ondemand prices in all regions using the Azure Retail Pricing API.

More information: https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices⁠ (opens in a new tab).

func inventory_server_prices_spot _azure.py:1909–1914⁠ (opens in a new tab)​

inventory_server_prices_spot(vendor)

List all known server spot prices in all regions using the Azure Retail Pricing API.

See details at inventory_server_prices.

func inventory_storages _azure.py:1952–2013⁠ (opens in a new tab)​

inventory_storages(vendor)

List all storage options via the Compute resource manager client.

For more information, see https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types⁠ (opens in a new tab).

func inventory_storage_prices _azure.py:2016–2106⁠ (opens in a new tab)​

inventory_storage_prices(vendor)

Look up Storage prices via the Azure Retail Prices API.

For more information, see https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices⁠ (opens in a new tab).

func inventory_traffic_prices _azure.py:2109–2169⁠ (opens in a new tab)​

inventory_traffic_prices(vendor)

Look up Internet Egress/Ingress prices via the Azure Retail Prices API.

For more information, see https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices⁠ (opens in a new tab).

func inventory_ipv4_prices _azure.py:2172–2203⁠ (opens in a new tab)​

inventory_ipv4_prices(vendor)

Look up Internet Egress/Ingress prices via the Azure Retail Prices API.

For more information, see https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices⁠ (opens in a new tab).

func inventory_databases _azure.py:2695–3015⁠ (opens in a new tab)​

inventory_databases(vendor)

List Azure Database for PostgreSQL Flexible Server types in all regions.

Existence comes from Flexible Server capabilities (supportedServerSkus) plus concrete Retail Standard_* meters only for series already seen in capabilities (quota-hidden sizes within a real family). Per-vCore series meters are pricing-only and must not invent VMVM: virtual machineA computer emulated in software on a physical host, with its own OS and a share of the host's CPUs, memory, and storage. Most cloud servers are VMs.WikipediaGlossary catalog sizes (e.g. DCasv5 / Dsv6 vs deployable DCadsv5 / Ddsv6).

SKUs with securityProfile ConfidentialVM are kept only when capabilities list them in an ACC region (West Europe / UAE North): other regions can advertise the same profile for non-startable shapes (e.g. Korea Central DCadsv6) with no status/reason distinguishing them. SKUs with an explicit disabled capability status are skipped. When database_id is in capabilities, those supply vCPUsvCPU: virtual CPUA CPU of a virtual machine, the unit in which cloud vendors sell compute. It is usually one hardware thread of a physical core with SMT, so two vCPUs may share one physical core.WikipediaGlossary, memory, HA, engine versions, storage bounds, and autotuning; otherwise edition defaults apply and vCPUs/memory come from the matching VM.

func inventory_database_prices _azure.py:3018–3104⁠ (opens in a new tab)​

inventory_database_prices(vendor)

List Azure Database for PostgreSQL Flexible Server on-demand prices from the Retail Pricing API.

SKU catalog comes from vendor.databases (built by inventory_databases / capabilities). Per-region capabilities are not used for pricing: emit a row whenever Retail has a meter for a known instance in that region.

OfferRestricted=Enabled means this subscription cannot list or provision Flexible Server SKUs there (empty supportedServerEditions), so capabilities give no confirmed region availability. Retail list prices may still exist; we keep those rows. https://learn.microsoft.com/en-us/azure/postgresql/troubleshoot/how-to-resolve-capacity-errors⁠ (opens in a new tab) https://learn.microsoft.com/en-us/rest/api/postgresql/capabilities-by-location/list⁠ (opens in a new tab)

More information: https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices⁠ (opens in a new tab).

func inventory_database_storages _azure.py:3107–3264⁠ (opens in a new tab)​

inventory_database_storages(vendor)

List all Azure Database for PostgreSQL Flexible Server storage options via the capabilities API.

func inventory_database_storage_prices _azure.py:3267–3314⁠ (opens in a new tab)​

inventory_database_storage_prices(vendor)

Look up Azure Database for PostgreSQL Flexible Server storage prices via the Azure Retail Prices API.

For more information, see https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices⁠ (opens in a new tab).