|
| 1 | +### Example 1: Regionally scoped Spot Placement Recommender scores |
| 2 | +```powershell |
| 3 | +$resourceSku1 = @{sku = "Standard_D2_v3"} |
| 4 | +$resourceSku2 = @{sku = "Standard_D2_v2"} |
| 5 | +$resourceSku3 = @{sku = "Standard_D4_v3"} |
| 6 | +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 |
| 7 | +$desiredLocations = 'japaneast','southcentralus','centralus' |
| 8 | +
|
| 9 | +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes |
| 10 | +$response.PlacementScore |
| 11 | +``` |
| 12 | + |
| 13 | +```output |
| 14 | +AvailabilityZone IsQuotaAvailable Region Score Sku |
| 15 | +---------------- ---------------- ------ ----- --- |
| 16 | + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 |
| 17 | + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 |
| 18 | + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 |
| 19 | + True southcentralus High Standard_D2_v3 |
| 20 | + True southcentralus High Standard_D2_v2 |
| 21 | + True southcentralus High Standard_D4_v3 |
| 22 | + True centralus RestrictedSkuNotAvailable Standard_D2_v3 |
| 23 | + True centralus RestrictedSkuNotAvailable Standard_D2_v2 |
| 24 | + True centralus RestrictedSkuNotAvailable Standard_D4_v3 |
| 25 | +``` |
| 26 | + |
| 27 | +Returns regionally scoped spot placement recommender scores for the input. |
| 28 | + |
| 29 | +### Example 2: Zonally scoped Spot Placement Recommender scores |
| 30 | +```powershell |
| 31 | +$resourceSku1 = @{sku = "Standard_D2_v3"} |
| 32 | +$resourceSku2 = @{sku = "Standard_D2_v2"} |
| 33 | +$resourceSku3 = @{sku = "Standard_D4_v3"} |
| 34 | +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 |
| 35 | +$desiredLocations = 'japaneast','southcentralus','centralus' |
| 36 | +
|
| 37 | +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone |
| 38 | +$response.PlacementScore |
| 39 | +``` |
| 40 | + |
| 41 | +```output |
| 42 | +AvailabilityZone IsQuotaAvailable Region Score Sku |
| 43 | +---------------- ---------------- ------ ----- --- |
| 44 | +1 True japaneast High Standard_D2_v3 |
| 45 | +2 True japaneast High Standard_D2_v3 |
| 46 | +3 True japaneast High Standard_D2_v3 |
| 47 | +1 True japaneast High Standard_D2_v2 |
| 48 | +2 True japaneast High Standard_D2_v2 |
| 49 | +3 True japaneast High Standard_D2_v2 |
| 50 | +1 True japaneast High Standard_D4_v3 |
| 51 | +2 True japaneast High Standard_D4_v3 |
| 52 | +3 True japaneast High Standard_D4_v3 |
| 53 | +1 True southcentralus High Standard_D2_v3 |
| 54 | +2 True southcentralus High Standard_D2_v3 |
| 55 | +3 True southcentralus High Standard_D2_v3 |
| 56 | +1 True southcentralus High Standard_D2_v2 |
| 57 | +2 True southcentralus High Standard_D2_v2 |
| 58 | +3 True southcentralus High Standard_D2_v2 |
| 59 | +1 True southcentralus High Standard_D4_v3 |
| 60 | +2 True southcentralus High Standard_D4_v3 |
| 61 | +3 True southcentralus High Standard_D4_v3 |
| 62 | +1 True centralus DataNotFoundOrStale Standard_D2_v3 |
| 63 | +2 True centralus High Standard_D2_v3 |
| 64 | +3 True centralus High Standard_D2_v3 |
| 65 | +1 True centralus DataNotFoundOrStale Standard_D2_v2 |
| 66 | +2 True centralus High Standard_D2_v2 |
| 67 | +3 True centralus High Standard_D2_v2 |
| 68 | +1 True centralus DataNotFoundOrStale Standard_D4_v3 |
| 69 | +2 True centralus High Standard_D4_v3 |
| 70 | +3 True centralus High Standard_D4_v3 |
| 71 | +``` |
| 72 | + |
| 73 | +Returns zonally scoped spot placement recommender scores for the input. |
| 74 | + |
| 75 | +### Example 3: Regionally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument |
| 76 | +```powershell |
| 77 | +$resourceSku1 = @{sku = "Standard_D2_v3"} |
| 78 | +$resourceSku2 = @{sku = "Standard_D2_v2"} |
| 79 | +$resourceSku3 = @{sku = "Standard_D4_v3"} |
| 80 | +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 |
| 81 | +$desiredLocations = 'japaneast','southcentralus','centralus' |
| 82 | +$desiredCount = 1 |
| 83 | +
|
| 84 | +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false} |
| 85 | +
|
| 86 | +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput |
| 87 | +$response.PlacementScore |
| 88 | +``` |
| 89 | + |
| 90 | +```output |
| 91 | +AvailabilityZone IsQuotaAvailable Region Score Sku |
| 92 | +---------------- ---------------- ------ ----- --- |
| 93 | + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 |
| 94 | + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 |
| 95 | + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 |
| 96 | + True southcentralus High Standard_D2_v3 |
| 97 | + True southcentralus High Standard_D2_v2 |
| 98 | + True southcentralus High Standard_D4_v3 |
| 99 | + True centralus RestrictedSkuNotAvailable Standard_D2_v3 |
| 100 | + True centralus RestrictedSkuNotAvailable Standard_D2_v2 |
| 101 | + True centralus RestrictedSkuNotAvailable Standard_D4_v3 |
| 102 | +``` |
| 103 | + |
| 104 | +Returns regionally scoped spot placement recommender scores for the input. |
| 105 | + |
| 106 | +### Example 2: Zonally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument |
| 107 | +```powershell |
| 108 | +$resourceSku1 = @{sku = "Standard_D2_v3"} |
| 109 | +$resourceSku2 = @{sku = "Standard_D2_v2"} |
| 110 | +$resourceSku3 = @{sku = "Standard_D4_v3"} |
| 111 | +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 |
| 112 | +$desiredLocations = 'japaneast','southcentralus','centralus' |
| 113 | +$desiredCount = 1 |
| 114 | +
|
| 115 | +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true} |
| 116 | +
|
| 117 | +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput |
| 118 | +$response.PlacementScore |
| 119 | +``` |
| 120 | + |
| 121 | +```output |
| 122 | +AvailabilityZone IsQuotaAvailable Region Score Sku |
| 123 | +---------------- ---------------- ------ ----- --- |
| 124 | +1 True japaneast High Standard_D2_v3 |
| 125 | +2 True japaneast High Standard_D2_v3 |
| 126 | +3 True japaneast High Standard_D2_v3 |
| 127 | +1 True japaneast High Standard_D2_v2 |
| 128 | +2 True japaneast High Standard_D2_v2 |
| 129 | +3 True japaneast High Standard_D2_v2 |
| 130 | +1 True japaneast High Standard_D4_v3 |
| 131 | +2 True japaneast High Standard_D4_v3 |
| 132 | +3 True japaneast High Standard_D4_v3 |
| 133 | +1 True southcentralus High Standard_D2_v3 |
| 134 | +2 True southcentralus High Standard_D2_v3 |
| 135 | +3 True southcentralus High Standard_D2_v3 |
| 136 | +1 True southcentralus High Standard_D2_v2 |
| 137 | +2 True southcentralus High Standard_D2_v2 |
| 138 | +3 True southcentralus High Standard_D2_v2 |
| 139 | +1 True southcentralus High Standard_D4_v3 |
| 140 | +2 True southcentralus High Standard_D4_v3 |
| 141 | +3 True southcentralus High Standard_D4_v3 |
| 142 | +1 True centralus High Standard_D2_v3 |
| 143 | +2 True centralus High Standard_D2_v3 |
| 144 | +3 True centralus High Standard_D2_v3 |
| 145 | +1 True centralus High Standard_D2_v2 |
| 146 | +2 True centralus High Standard_D2_v2 |
| 147 | +3 True centralus High Standard_D2_v2 |
| 148 | +1 True centralus High Standard_D4_v3 |
| 149 | +2 True centralus High Standard_D4_v3 |
| 150 | +3 True centralus High Standard_D4_v3 |
| 151 | +``` |
| 152 | + |
| 153 | +Returns zonally scoped spot placement recommender scores for the input. |
0 commit comments