Condividi tramite


Invoke-AzSpotPlacementScore

Genera punteggi di posizionamento per sku di macchine virtuali spot.

Sintassi

Invoke-AzSpotPlacementScore
      -Location <String>
      [-SubscriptionId <String>]
      [-AvailabilityZone]
      [-DesiredCount <Int32>]
      [-DesiredLocation <String[]>]
      [-DesiredSize <IResourceSize[]>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzSpotPlacementScore
      -Location <String>
      [-SubscriptionId <String>]
      -SpotPlacementScoresInput <ISpotPlacementScoresInput>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzSpotPlacementScore
      -InputObject <IComputeIdentity>
      [-AvailabilityZone]
      [-DesiredCount <Int32>]
      [-DesiredLocation <String[]>]
      [-DesiredSize <IResourceSize[]>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzSpotPlacementScore
      -InputObject <IComputeIdentity>
      -SpotPlacementScoresInput <ISpotPlacementScoresInput>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Descrizione

Genera punteggi di posizionamento per sku di macchine virtuali spot.

Esempio

Esempio 1: Punteggi di posizionamento spot con ambito regionale

$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

Restituisce punteggi di posizionamento spot con ambito a livello di area per l'input.

Esempio 2: Punteggi di posizionamento spot con ambito Zonally

$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

Restituisce punteggi di posizionamento spot con ambito zonal per l'input.

Esempio 3: Punteggi di posizionamento spot con ambito regionale usando il parametro SpotPlacementScoresInput come argomento

$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

Restituisce punteggi di posizionamento spot con ambito a livello di area per l'input.

Esempio 4: Punteggi di posizionamento spot con ambito Zonally usando il parametro SpotPlacementScoresInput come argomento

$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

Restituisce punteggi di posizionamento spot con ambito zonal per l'input.

Parametri

-AvailabilityZone

Definisce se l'ambito è zonale o regionale.

Tipo:SwitchParameter
Posizione:Named
Valore predefinito:None
Necessario:False
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-Confirm

Richiede conferma prima di eseguire il cmdlet.

Tipo:SwitchParameter
Alias:cf
Posizione:Named
Valore predefinito:None
Necessario:False
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-DefaultProfile

Il parametro DefaultProfile non è funzionale. Usare il parametro SubscriptionId quando disponibile se si esegue il cmdlet su una sottoscrizione diversa.

Tipo:PSObject
Alias:AzureRMContext, AzureCredential
Posizione:Named
Valore predefinito:None
Necessario:False
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-DesiredCount

Numero di istanze desiderate per area/zona in base all'ambito.

Tipo:Int32
Posizione:Named
Valore predefinito:None
Necessario:False
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-DesiredLocation

Aree desiderate

Tipo:String[]
Posizione:Named
Valore predefinito:None
Necessario:False
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-DesiredSize

SKU di risorsa desiderati. Per costruire, vedere la sezione NOTES per le proprietà DESIREDSIZE e creare una tabella hash.

Tipo:IResourceSize[]
Posizione:Named
Valore predefinito:None
Necessario:False
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-InputObject

Parametro Identity Per costruire, vedere la sezione NOTES per le proprietà INPUTOBJECT e creare una tabella hash.

Tipo:IComputeIdentity
Posizione:Named
Valore predefinito:None
Necessario:True
Accettare l'input della pipeline:True
Accettare caratteri jolly:False

-Location

Nome dell'area di Azure.

Tipo:String
Posizione:Named
Valore predefinito:None
Necessario:True
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-SpotPlacementScoresInput

Input DELL'API SpotPlacementScores. Per costruire, vedere la sezione NOTES per le proprietà SPOTPLACEMENTSCORESINPUT e creare una tabella hash.

Tipo:ISpotPlacementScoresInput
Alias:SpotPlacementRecommenderInput
Posizione:Named
Valore predefinito:None
Necessario:True
Accettare l'input della pipeline:True
Accettare caratteri jolly:False

-SubscriptionId

Credenziali di sottoscrizione che identificano in modo univoco la sottoscrizione di Microsoft Azure. L'ID sottoscrizione fa parte dell'URI per ogni chiamata al servizio.

Tipo:String
Posizione:Named
Valore predefinito:(Get-AzContext).Subscription.Id
Necessario:False
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-WhatIf

Mostra cosa accadrebbe se il cmdlet viene eseguito. Il cmdlet non viene eseguito.

Tipo:SwitchParameter
Alias:wi
Posizione:Named
Valore predefinito:None
Necessario:False
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

Input

ISpotPlacementScoresInput

IComputeIdentity

Output

ISpotPlacementScoresResponse

Note

ALIAS

Invoke-AzSpotPlacementRecommender