Bagikan melalui


Invoke-AzSpotPlacementRecommender

Menghasilkan skor penempatan untuk sku Spot VM.

Sintaks

Invoke-AzSpotPlacementRecommender
      -Location <String>
      [-SubscriptionId <String>]
      [-AvailabilityZone]
      [-DesiredCount <Int32>]
      [-DesiredLocation <String[]>]
      [-DesiredSize <IResourceSize[]>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzSpotPlacementRecommender
      -Location <String>
      [-SubscriptionId <String>]
      -SpotPlacementRecommenderInput <ISpotPlacementRecommenderInput>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzSpotPlacementRecommender
      -InputObject <IComputeIdentity>
      [-AvailabilityZone]
      [-DesiredCount <Int32>]
      [-DesiredLocation <String[]>]
      [-DesiredSize <IResourceSize[]>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzSpotPlacementRecommender
      -InputObject <IComputeIdentity>
      -SpotPlacementRecommenderInput <ISpotPlacementRecommenderInput>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Deskripsi

Menghasilkan skor penempatan untuk sku Spot VM.

Contoh

Contoh 1: Skor Pemberi Rekomendasi Penempatan Spot yang dilingkup secara regional

$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-AzSpotPlacementRecommender -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

Mengembalikan skor pemberi rekomendasi penempatan spot yang terlingkup secara regional untuk input.

Contoh 2: Skor Pemberi Rekomendasi Penempatan Spot yang terlingkup secara zona

$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-AzSpotPlacementRecommender -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

Mengembalikan skor pemberi rekomendasi penempatan spot yang terlingkup secara zona untuk input.

Contoh 3: Skor Pemberi Rekomendasi Penempatan Spot yang dilingkup secara regional menggunakan parameter SpotPlacementRecommenderInput sebagai argumen

$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

$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false}

$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput
$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

Mengembalikan skor pemberi rekomendasi penempatan spot yang terlingkup secara regional untuk input.

Contoh 2: Skor Pemberi Rekomendasi Penempatan Spot yang terlingkup secara zona menggunakan parameter SpotPlacementRecommenderInput sebagai argumen

$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

$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true}

$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput
$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

Mengembalikan skor pemberi rekomendasi penempatan spot yang terlingkup secara zona untuk input.

Parameter

-AvailabilityZone

Menentukan apakah cakupannya adalah zonal atau regional.

Jenis:SwitchParameter
Position:Named
Nilai default:None
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

-Confirm

Meminta Anda mengonfirmasi sebelum menjalankan cmdlet.

Jenis:SwitchParameter
Alias:cf
Position:Named
Nilai default:None
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

-DefaultProfile

Parameter DefaultProfile tidak berfungsi. Gunakan parameter SubscriptionId saat tersedia jika menjalankan cmdlet terhadap langganan yang berbeda.

Jenis:PSObject
Alias:AzureRMContext, AzureCredential
Position:Named
Nilai default:None
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

-DesiredCount

Jumlah instans yang diinginkan per wilayah/zona berdasarkan cakupan.

Jenis:Int32
Position:Named
Nilai default:None
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

-DesiredLocation

Wilayah yang diinginkan

Jenis:String[]
Position:Named
Nilai default:None
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

-DesiredSize

SKU sumber daya yang diinginkan. Untuk membuat, lihat bagian CATATAN untuk properti DESIREDSIZE dan membuat tabel hash.

Jenis:IResourceSize[]
Position:Named
Nilai default:None
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

-InputObject

Parameter Identitas Untuk membangun, lihat bagian CATATAN untuk properti INPUTOBJECT dan membuat tabel hash.

Jenis:IComputeIdentity
Position:Named
Nilai default:None
Diperlukan:True
Terima input alur:True
Terima karakter wildcard:False

-Location

Nama wilayah Azure.

Jenis:String
Position:Named
Nilai default:None
Diperlukan:True
Terima input alur:False
Terima karakter wildcard:False

-SpotPlacementRecommenderInput

Input API SpotPlacementRecommender. Untuk membuat, lihat bagian CATATAN untuk properti SPOTPLACEMENTRECOMMENDERINPUT dan membuat tabel hash.

Jenis:ISpotPlacementRecommenderInput
Position:Named
Nilai default:None
Diperlukan:True
Terima input alur:True
Terima karakter wildcard:False

-SubscriptionId

Kredensial langganan yang secara unik mengidentifikasi langganan Microsoft Azure. ID langganan membentuk bagian dari URI untuk setiap panggilan layanan.

Jenis:String
Position:Named
Nilai default:(Get-AzContext).Subscription.Id
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

-WhatIf

Menunjukkan apa yang akan terjadi jika cmdlet berjalan. Cmdlet tidak dijalankan.

Jenis:SwitchParameter
Alias:wi
Position:Named
Nilai default:None
Diperlukan:False
Terima input alur:False
Terima karakter wildcard:False

Input

ISpotPlacementRecommenderInput

IComputeIdentity

Output

ISpotPlacementRecommenderResponse