共用方式為


az compute-recommender

管理計算資源的 SKU/區域/區域推薦資訊。

命令

名稱 Description 類型 狀態
az compute-recommender spot-placement-score

產生 Spot VM SKU 的放置分數。

Core GA

az compute-recommender spot-placement-score

產生 Spot VM SKU 的放置分數。

az compute-recommender spot-placement-score --desired-locations
                                            --desired-sizes
                                            [--availability-zones {0, 1, f, false, n, no, t, true, y, yes}]
                                            [--desired-count]
                                            [--ids]
                                            [--location]
                                            [--subscription]

範例

產生現成 VM 放置分數範例

az compute-recommender spot-placement-score -l eastus --subscription ffffffff-ffff-ffff-ffff-ffffffffffff --availability-zones true --desired-locations '["eastus", "eastus2"]' --desired-count 1 --desired-sizes '[{"sku": "Standard_D2_v2"}]'

必要參數

--desired-locations

所需的區域支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

屬性
參數群組: SpotPlacementScoresInput Arguments
--desired-sizes

所需的資源 SKU。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

屬性
參數群組: SpotPlacementScoresInput Arguments

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--availability-zones

定義範圍是否為區域性或區域。

屬性
參數群組: SpotPlacementScoresInput Arguments
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--desired-count

根據範圍,每個區域/區域的所需實例計數。

屬性
參數群組: SpotPlacementScoresInput Arguments
--ids

一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

屬性
參數群組: Resource Id Arguments
--location -l

位置。 值的來源:az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

屬性
參數群組: Resource Id Arguments
--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

屬性
參數群組: Resource Id Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False