|
1 | 1 | ---
|
2 | 2 | title: Spot Placement Score
|
3 |
| -description: Learn how to use Azure Spot Virtual Machines to save on costs. |
| 3 | +description: Learn how to use Azure Spot Placement Score to evaluate deployment success. |
4 | 4 | author: am4234m
|
5 | 5 | ms.author: aparnamishra
|
6 | 6 | ms.service: azure-virtual-machines
|
7 | 7 | ms.subservice: azure-spot-vm
|
8 | 8 | ms.topic: how-to
|
9 |
| -ms.date: 08/07/2024 |
| 9 | +ms.date: 08/09/2024 |
10 | 10 | ms.reviewer: ju-shim
|
11 | 11 | ---
|
12 | 12 |
|
@@ -77,37 +77,44 @@ POST https://management.azure.com/subscriptions/{subscription}/providers/Microso
|
77 | 77 |
|
78 | 78 | ```json
|
79 | 79 | {
|
80 |
| -"desiredLocations": [" "], |
| 80 | +"desiredLocations": "", |
81 | 81 | "desiredSizes": [{
|
82 |
| -"sku": " " |
83 |
| -}], |
84 |
| -"desiredCount": |
| 82 | + "sku": "" |
| 83 | + }], |
| 84 | +"desiredCount": "" |
85 | 85 | }
|
| 86 | +``` |
86 | 87 |
|
87 | 88 | ### [Azure CLI 2.0](#tab/cli)
|
88 | 89 |
|
89 |
| -Access Spot Placement Score using Azure CLI. |
90 |
| - |
91 |
| -az compute-recommender spot-placement-recommender [--availability-zones {0, 1, f, false, n, no, t, true, y, yes}] |
92 |
| - [--desired-count] |
93 |
| - [--desired-locations] |
94 |
| - [--desired-sizes] |
95 |
| - [--ids] |
96 |
| - [--location] |
97 |
| - [--subscription] |
| 90 | +Access Spot Placement Score using Azure CLI command [az compute-recommender spot-placement-recommender](https://learn.microsoft.com/cli/azure/compute-recommender?view=azure-cli-latest#az-compute-recommender-spot-placement-recommender). |
| 91 | + |
| 92 | +```azurecli-interactive |
| 93 | +az compute-recommender spot-placement-recommender \ |
| 94 | + --availability-zones <> \ |
| 95 | + --desired-count <> \ |
| 96 | + --desired-locations <> \ |
| 97 | + --desired-sizes <> \ |
| 98 | + --ids <> \ |
| 99 | + --location <> \ |
| 100 | + --subscription <> \ |
| 101 | +``` |
98 | 102 |
|
99 | 103 | ### [Azure PowerShell](#tab/powershell)
|
100 | 104 |
|
101 |
| -Access the Spot Placement Score using Azure PowerShell through the `Invoke-AzSpotPlacementScore` command to call the API endpoint. Replace all parameters with your specific details: |
| 105 | +Access the Spot Placement Score using Azure PowerShell command [Invoke-AzSpotPlacementScore](https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementscore) to call the API endpoint. Replace all parameters with your specific details: |
102 | 106 |
|
103 |
| -Invoke-AzSpotPlacementScore |
104 |
| - -Location <String> |
105 |
| - [-SubscriptionId <String>] |
106 |
| - [-AvailabilityZone] |
107 |
| - [-DesiredCount <Int32>] |
108 |
| - [-DesiredLocation <String[]>] |
109 |
| - [-DesiredSize <IResourceSize[]>] |
| 107 | +```azurepowershell-interactive |
| 108 | +Invoke-AzSpotPlacementScore |
| 109 | + -Location <String> |
| 110 | + -SubscriptionId <String> |
| 111 | + -AvailabilityZone |
| 112 | + -DesiredCount <Int32> |
| 113 | + -DesiredLocation <String[]> |
| 114 | + -DesiredSize <IResourceSize[]> |
| 115 | +``` |
110 | 116 |
|
| 117 | +--- |
111 | 118 |
|
112 | 119 | ## Examples
|
113 | 120 |
|
@@ -166,7 +173,7 @@ The following scenario assumptions apply to this example:
|
166 | 173 | | 200 | Successful request | Spot Placement Score operations complete successfully. |
|
167 | 174 | | 400 | Bad error request | At least one required input parameter isn't present, or the values of the provided parameters aren't valid. Produces a detailed error message about the failed request. |
|
168 | 175 | | 429 | Too many requests | Unable to generate placement score due to hitting a rate limit. |
|
169 |
| -| 500 | Internal server error | The placement score generation failed. Produces a detailed error message about the failed request. |
| 176 | +| 500 | Internal server error | The placement score generation failed. Produces a detailed error message about the failed request. | |
170 | 177 |
|
171 | 178 | ## Next steps
|
172 | 179 |
|
|
0 commit comments