Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Invoke-AzSpotPlacementScore
- Module:
- Az.Compute Module
Generates placement scores for Spot VM skus.
Syntax
PostExpanded (Default)
Invoke-AzSpotPlacementScore
-Location <String>
[-SubscriptionId <String>]
[-AvailabilityZone]
[-DesiredCount <Int32>]
[-DesiredLocation <String[]>]
[-DesiredSize <IResourceSize[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PostViaJsonString
Invoke-AzSpotPlacementScore
-Location <String>
-JsonString <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PostViaJsonFilePath
Invoke-AzSpotPlacementScore
-Location <String>
-JsonFilePath <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Post
Invoke-AzSpotPlacementScore
-Location <String>
-SpotPlacementScoresInput <ISpotPlacementScoresInput>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PostViaIdentityExpanded
Invoke-AzSpotPlacementScore
-InputObject <IComputeIdentity>
[-AvailabilityZone]
[-DesiredCount <Int32>]
[-DesiredLocation <String[]>]
[-DesiredSize <IResourceSize[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PostViaIdentity
Invoke-AzSpotPlacementScore
-InputObject <IComputeIdentity>
-SpotPlacementScoresInput <ISpotPlacementScoresInput>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Generates placement scores for Spot VM skus.
Examples
Example 1: Regionally scoped Spot Placement scores
$resourceSku1 = @{sku = "Standard_D2_v3"}
$resourceSku2 = @{sku = "Standard_D2_v2"}
$resourceSku3 = @{sku = "Standard_D4_v3"}
$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
$desiredLocations = 'japaneast','southcentralus','centralus'
$response = Invoke-AzSpotPlacementScore -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes
$response.PlacementScore
AvailabilityZone IsQuotaAvailable Region Score Sku
---------------- ---------------- ------ ----- ---
True japaneast RestrictedSkuNotAvailable Standard_D2_v3
True japaneast RestrictedSkuNotAvailable Standard_D2_v2
True japaneast RestrictedSkuNotAvailable Standard_D4_v3
True southcentralus High Standard_D2_v3
True southcentralus High Standard_D2_v2
True southcentralus High Standard_D4_v3
True centralus RestrictedSkuNotAvailable Standard_D2_v3
True centralus RestrictedSkuNotAvailable Standard_D2_v2
True centralus RestrictedSkuNotAvailable Standard_D4_v3
Returns regionally scoped spot placement scores for the input.
Example 2: Zonally scoped Spot Placement Scores
$resourceSku1 = @{sku = "Standard_D2_v3"}
$resourceSku2 = @{sku = "Standard_D2_v2"}
$resourceSku3 = @{sku = "Standard_D4_v3"}
$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
$desiredLocations = 'japaneast','southcentralus','centralus'
$response = Invoke-AzSpotPlacementScore -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone
$response.PlacementScore
AvailabilityZone IsQuotaAvailable Region Score Sku
---------------- ---------------- ------ ----- ---
1 True japaneast High Standard_D2_v3
2 True japaneast High Standard_D2_v3
3 True japaneast High Standard_D2_v3
1 True japaneast High Standard_D2_v2
2 True japaneast High Standard_D2_v2
3 True japaneast High Standard_D2_v2
1 True japaneast High Standard_D4_v3
2 True japaneast High Standard_D4_v3
3 True japaneast High Standard_D4_v3
1 True southcentralus High Standard_D2_v3
2 True southcentralus High Standard_D2_v3
3 True southcentralus High Standard_D2_v3
1 True southcentralus High Standard_D2_v2
2 True southcentralus High Standard_D2_v2
3 True southcentralus High Standard_D2_v2
1 True southcentralus High Standard_D4_v3
2 True southcentralus High Standard_D4_v3
3 True southcentralus High Standard_D4_v3
1 True centralus DataNotFoundOrStale Standard_D2_v3
2 True centralus High Standard_D2_v3
3 True centralus High Standard_D2_v3
1 True centralus DataNotFoundOrStale Standard_D2_v2
2 True centralus High Standard_D2_v2
3 True centralus High Standard_D2_v2
1 True centralus DataNotFoundOrStale Standard_D4_v3
2 True centralus High Standard_D4_v3
3 True centralus High Standard_D4_v3
Returns zonally scoped spot placement scores for the input.
Example 3: Regionally scoped Spot Placement Scores using SpotPlacementScoresInput parameter as argument
$resourceSku1 = @{sku = "Standard_D2_v3"}
$resourceSku2 = @{sku = "Standard_D2_v2"}
$resourceSku3 = @{sku = "Standard_D4_v3"}
$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
$desiredLocations = 'japaneast','southcentralus','centralus'
$desiredCount = 1
$spotPlacementScoresInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false}
$response = Invoke-AzSpotPlacementScore -Location eastus -SpotPlacementScoresInput $spotPlacementScoresInput
$response.PlacementScore
AvailabilityZone IsQuotaAvailable Region Score Sku
---------------- ---------------- ------ ----- ---
True japaneast RestrictedSkuNotAvailable Standard_D2_v3
True japaneast RestrictedSkuNotAvailable Standard_D2_v2
True japaneast RestrictedSkuNotAvailable Standard_D4_v3
True southcentralus High Standard_D2_v3
True southcentralus High Standard_D2_v2
True southcentralus High Standard_D4_v3
True centralus RestrictedSkuNotAvailable Standard_D2_v3
True centralus RestrictedSkuNotAvailable Standard_D2_v2
True centralus RestrictedSkuNotAvailable Standard_D4_v3
Returns regionally scoped spot placement scores for the input.
Example 4: Zonally scoped Spot Placement scores using SpotPlacementScoresInput parameter as argument
$resourceSku1 = @{sku = "Standard_D2_v3"}
$resourceSku2 = @{sku = "Standard_D2_v2"}
$resourceSku3 = @{sku = "Standard_D4_v3"}
$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3
$desiredLocations = 'japaneast','southcentralus','centralus'
$desiredCount = 1
$spotPlacementScoresInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true}
$response = Invoke-AzSpotPlacementScore -Location eastus -SpotPlacementScoresInput $spotPlacementScoresInput
$response.PlacementScore
AvailabilityZone IsQuotaAvailable Region Score Sku
---------------- ---------------- ------ ----- ---
1 True japaneast High Standard_D2_v3
2 True japaneast High Standard_D2_v3
3 True japaneast High Standard_D2_v3
1 True japaneast High Standard_D2_v2
2 True japaneast High Standard_D2_v2
3 True japaneast High Standard_D2_v2
1 True japaneast High Standard_D4_v3
2 True japaneast High Standard_D4_v3
3 True japaneast High Standard_D4_v3
1 True southcentralus High Standard_D2_v3
2 True southcentralus High Standard_D2_v3
3 True southcentralus High Standard_D2_v3
1 True southcentralus High Standard_D2_v2
2 True southcentralus High Standard_D2_v2
3 True southcentralus High Standard_D2_v2
1 True southcentralus High Standard_D4_v3
2 True southcentralus High Standard_D4_v3
3 True southcentralus High Standard_D4_v3
1 True centralus High Standard_D2_v3
2 True centralus High Standard_D2_v3
3 True centralus High Standard_D2_v3
1 True centralus High Standard_D2_v2
2 True centralus High Standard_D2_v2
3 True centralus High Standard_D2_v2
1 True centralus High Standard_D4_v3
2 True centralus High Standard_D4_v3
3 True centralus High Standard_D4_v3
Returns zonally scoped spot placement scores for the input.
Parameters
-AvailabilityZone
Defines if the scope is zonal or regional.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
| Type: | PSObject |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzureRMContext, AzureCredential |
Parameter sets
-DesiredCount
Desired instance count per region/zone based on the scope.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DesiredLocation
The desired regions
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DesiredSize
The desired resource SKUs.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-InputObject
Identity Parameter
Parameter properties
| Type: | IComputeIdentity |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-JsonFilePath
Path of Json file supplied to the Post operation
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-JsonString
Json string supplied to the Post operation
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Location
The name of the Azure region.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SpotPlacementScoresInput
SpotPlacementScores API Input.
Parameter properties
| Type: | ISpotPlacementScoresInput |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | SpotPlacementRecommenderInput |
Parameter sets
-SubscriptionId
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Parameter properties
| Type: | String |
| Default value: | (Get-AzContext).Subscription.Id |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
IComputeIdentity
ISpotPlacementScoresInput
Outputs
ISpotPlacementScoresResponse
Notes
ALIASES
Invoke-AzSpotPlacementRecommender
Azure PowerShell
Feedback
Was this page helpful?
