Skip to content

Commit 03eac32

Browse files
authored
Update spot-placement-score.md
1 parent 0d46732 commit 03eac32

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

articles/virtual-machines/spot-placement-score.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
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.
44
author: am4234m
55
ms.author: aparnamishra
66
ms.service: azure-virtual-machines
77
ms.subservice: azure-spot-vm
88
ms.topic: how-to
9-
ms.date: 08/07/2024
9+
ms.date: 08/09/2024
1010
ms.reviewer: ju-shim
1111
---
1212

@@ -77,37 +77,44 @@ POST https://management.azure.com/subscriptions/{subscription}/providers/Microso
7777

7878
```json
7979
{
80-
"desiredLocations": [" "],
80+
"desiredLocations": "",
8181
"desiredSizes": [{
82-
"sku": " "
83-
}],
84-
"desiredCount":
82+
"sku": ""
83+
}],
84+
"desiredCount": ""
8585
}
86+
```
8687

8788
### [Azure CLI 2.0](#tab/cli)
8889

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+
```
98102

99103
### [Azure PowerShell](#tab/powershell)
100104

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:
102106

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+
```
110116

117+
---
111118

112119
## Examples
113120

@@ -166,7 +173,7 @@ The following scenario assumptions apply to this example:
166173
| 200 | Successful request | Spot Placement Score operations complete successfully. |
167174
| 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. |
168175
| 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. |
170177

171178
## Next steps
172179

0 commit comments

Comments
 (0)