You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/spot-vms.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,8 @@ With variable pricing, you have option to set a max price, in US dollars (USD),
72
72
73
73
## Pricing and eviction history
74
74
75
+
### Portal
76
+
75
77
You can see historical pricing and eviction rates per size in a region in the portal. Select **View pricing history and compare prices in nearby regions** to see a table or graph of pricing for a specific size. The pricing and eviction rates in the following images are only examples.
76
78
77
79
**Chart**:
@@ -82,7 +84,42 @@ You can see historical pricing and eviction rates per size in a region in the po
82
84
83
85
:::image type="content" source="./media/spot-table.png" alt-text="Screenshot of the region options with the difference in pricing and eviction rates as a table.":::
84
86
87
+
### Azure Resource Graph
88
+
89
+
You can programmatically access relevant Spot VM SKU data through [Azure Resource Graph](/azure/governance/resource-graph/overview). Get pricing history in the last 90 days and eviction rates for the last 28 trailing days to identify SKUs that better meet your specific needs.
90
+
91
+
Key benefits:
92
+
- Query Spot eviction rates and the last few months of Spot prices programmatically through ARM or the [ARG Explorer in Azure portal](/azure/governance/resource-graph/first-query-portal)
93
+
- Create a custom query to extract the specific data relevant to your scenario with the ability to filter across a variety of parameters, such as SKU and region
94
+
- Easily compare data across multiple regions and SKUs
95
+
- Find a different Spot SKU or region with a lower price and/or eviction rate
96
+
97
+
Try out the following sample queries for Spot pricing history and eviction rates using the [ARG Explorer in Azure portal](/azure/governance/resource-graph/first-query-portal). Spot pricing history and eviction rates data is available in the `SpotResources` table.
98
+
99
+
**Spot pricing history sample query**:
100
+
101
+
```sql
102
+
SpotResources
103
+
| where type =~ 'microsoft.compute/skuspotpricehistory/ostype/location'
0 commit comments