Skip to content

Commit eede29a

Browse files
Add Azure Spot include file
1 parent 1fe45a1 commit eede29a

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
author: timwarner-msft
3+
ms.service: resource-graph
4+
ms.topic: include
5+
ms.date: 03/18/2022
6+
ms.author: timwarner
7+
ms.custom: generated
8+
---
9+
10+
### Compare the Spot eviction rate across multiple VM SKUs and regions
11+
12+
This query gets the Spot eviction rate across multiple VM SKUs and regions. Spot eviction rate is presented as a percentage range. The results are sorted by VM SKU and region in ascending order.
13+
14+
```kusto
15+
SpotResources
16+
| where type =~ 'microsoft.compute/skuspotevictionrate/location'
17+
| where sku.name in~ ('standard_d2s_v4', 'standard_d4s_v4')
18+
| where location in~ ('eastus', 'southcentralus')
19+
| project skuName = tostring(sku.name), location, spotEvictionRate = tostring(properties.evictionRate)
20+
| order by skuName asc, location asc
21+
```
22+
23+
### Compare the latest Spot price across multiple VM SKUs and regions for an OS type
24+
25+
This query gets the latest Spot price across multiple VM SKUs and regions for an OS type. The results are sorted by price in ascending order.
26+
27+
```kusto
28+
SpotResources
29+
| where type =~ 'microsoft.compute/skuspotpricehistory/ostype/location'
30+
| where sku.name in~ ('standard_d2s_v4', 'standard_d4s_v4')
31+
| where properties.osType =~ 'linux'
32+
| where location in~ ('eastus', 'southcentralus')
33+
| project skuName = tostring(sku.name), osType = tostring(properties.osType), location, latestSpotPriceUSD = todouble(properties.spotPrices[0].priceUSD)
34+
| order by latestSpotPriceUSD asc
35+
```
36+
37+
---

0 commit comments

Comments
 (0)