Azure Pricing Skill
Query Azure retail prices via https://prices.azure.com/api/retail/prices
Scripts are located under scripts folder
Workflow
- •Parse user query - Extract SKU name
- •Run the Python script - MANDATORY, do not use curl
- •Display the FULL output - Both tables must be shown
CRITICAL: Always Use the Python Script
DO NOT use curl or manual API calls. ALWAYS run this command:
On Linux/Mac:
python3 scripts/query_vm_pricing.py --sku Standard_D48as_v6
On Windows:
python scripts\query_vm_pricing.py --sku Standard_D48as_v6
The script outputs TWO sections - you must display BOTH:
- •Summary table (all regions)
- •Cost analysis (cheapest vs most expensive with savings)
Options:
- •
--sku- VM SKU name (required, e.g., Standard_D48as_v6) - •
--currency- Currency code (default: USD) - •
--regions- Comma-separated list of specific regions (optional)
Required Output Format
The script produces TWO sections that MUST both be displayed:
Section 1: Summary Table (All Regions)
Sorted by Linux hourly price (ascending):
| Region | Linux (Win+AHB)/hr | Windows/hr | Spot/hr | 1yr Reserved | 3yr Reserved |
|---|---|---|---|---|---|
| eastus | $2.304 | $3.120 | $0.461 | $1.456 | $0.982 |
| ... |
Notes:
- •Linux and Windows with Azure Hybrid Benefit share the same compute price
- •Spot prices vary based on demand and can be evicted
Section 2: Cost Analysis (8,760 hrs/year)
Cheapest Region: {region}
| Price Type | Hourly | Annual |
|---|
Most Expensive Region: {region}
| Price Type | Hourly | Annual |
|---|
Annual Savings (Cheapest vs Most Expensive)
| Price Type | Cheapest Annual | Expensive Annual | Savings | % Saved |
|---|
IMPORTANT: Always show BOTH sections. Do not truncate or summarize.
API Reference
Base URL: https://prices.azure.com/api/retail/prices
Key Filters:
- •
serviceName eq 'Virtual Machines' - •
armSkuName eq 'Standard_D48as_v6' - •
priceType eq 'Consumption'or'Reservation'or'Spot'
Product Name Patterns:
- •Linux:
Virtual Machines Dasv6 Series(no "Windows" in name) - •Windows:
Virtual Machines Dasv6 Series Windows - •Spot:
priceType eq 'Spot'filter
Service Name Mapping
For non-VM queries, see references/service-mapping.md for mapping common terms to API serviceName values.
Common mappings:
- •vm, virtual machine →
Virtual Machines - •storage, blob, disk →
Storage - •sql, database →
SQL Database - •aks, kubernetes →
Azure Kubernetes Service