az baremetalinstance
Note
此參考文獻是Azure CLI裸金屬基礎設施擴充套件(版本 2.57.0 或更高版本)的一部分。 擴充功能會在您第一次執行 az baremetalinstance 命令時自動安裝。 深入了解擴充功能。
Handle Operations for Compute Azure Bare instances.
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az baremetalinstance create |
建立一個 Azure 裸機實例,針對指定的訂閱、資源群組和實例名稱。 |
Extension | GA |
| az baremetalinstance delete |
刪除指定的訂閱、資源群組和實例名稱的 Azure 裸機實例。 |
Extension | GA |
| az baremetalinstance list |
列出指定訂閱中 Azure 裸機實例的清單。 操作會回傳每個 Azure 裸機實例的不同屬性。 |
Extension | GA |
| az baremetalinstance restart |
重新啟動 Azure 裸機實例的操作。 |
Extension | GA |
| az baremetalinstance show |
為指定的訂閱、資源群組和實例名稱取得一個 Azure 裸機實例。 |
Extension | GA |
| az baremetalinstance shutdown |
關閉 Azure 裸機實例的操作。 |
Extension | GA |
| az baremetalinstance start |
啟動 Azure 裸機實例的操作。 |
Extension | GA |
| az baremetalinstance update |
更新一個 Azure 裸機實例,以指定訂閱、資源群組和實例名稱。 |
Extension | GA |
az baremetalinstance create
建立一個 Azure 裸機實例,針對指定的訂閱、資源群組和實例名稱。
az baremetalinstance create --instance-name
--resource-group
[--acquire-policy-token]
[--azure-bare-metal-instance-size --sku {S112, S144, S144m, S192, S192m, S192xm, S224, S224m, S224om, S224oo, S224oom, S224ooo, S384, S384m, S384xm, S384xxm, S448, S448m, S448om, S448oo, S448oom, S448ooo, S448se, S576m, S576xm, S672, S672m, S672om, S672oo, S672oom, S672ooo, S72, S72m, S768, S768m, S768xm, S896, S896m, S896om, S896oo, S896oom, S896ooo, S96, S960m}]
[--bmi-id --instance-id]
[--change-reference]
[--hardware-type {Cisco_UCS, HPE, SDFLEX}]
[--hw-revision]
[--location]
[--network-profile]
[--os-profile]
[--power-state {restarting, started, starting, stopped, stopping, unknown}]
[--ppg --proximity-placement-group]
[--storage-profile]
[--tags]
範例
建立計算資源
az baremetalinstance create --resource-group myResourceGroup --instance-name myBMIInstance --location westus --sku S72
必要參數
Azure 裸機實例的名稱,也稱為 ResourceName。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
指定 Azure 裸機實例 SKU。
| 屬性 | 值 |
|---|---|
| 參數群組: | HardwareProfile Arguments |
| 接受的值: | S112, S144, S144m, S192, S192m, S192xm, S224, S224m, S224om, S224oo, S224oom, S224ooo, S384, S384m, S384xm, S384xxm, S448, S448m, S448om, S448oo, S448oom, S448ooo, S448se, S576m, S576xm, S672, S672m, S672om, S672oo, S672oom, S672ooo, S72, S72m, S768, S768m, S768xm, S896, S896m, S896om, S896oo, S896oom, S896ooo, S96, S960m |
指定 Azure 裸機實例的唯一 ID。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
硬體類型的名稱(廠商和/或其產品名稱)。
| 屬性 | 值 |
|---|---|
| 參數群組: | HardwareProfile Arguments |
| 接受的值: | Cisco_UCS, HPE, SDFLEX |
Azure裸機實例的硬體版本。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
未指定資源所在的地理位置,將會使用資源群組的位置。
| 屬性 | 值 |
|---|---|
| 參數群組: | RequestBodyParameters Arguments |
指定 Azure 裸機實例的網路設定。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
指定 Azure 裸機實例的作業系統設定。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
資源電源狀態。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
| 接受的值: | restarting, started, starting, stopped, stopping, unknown |
資源鄰近放置群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
指定 Azure 裸機實例磁碟的儲存設定。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | Properties Arguments |
資源標籤。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | RequestBodyParameters Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az baremetalinstance delete
刪除指定的訂閱、資源群組和實例名稱的 Azure 裸機實例。
az baremetalinstance delete [--acquire-policy-token]
[--change-reference]
[--ids]
[--instance-name]
[--resource-group]
[--subscription]
[--yes]
範例
刪除計算資源
az baremetalinstance delete -g myResourceGroup -n myAzureBareMetalInstance
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Azure 裸機實例的名稱,也稱為 ResourceName。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請勿提示確認。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az baremetalinstance list
列出指定訂閱中 Azure 裸機實例的清單。 操作會回傳每個 Azure 裸機實例的不同屬性。
az baremetalinstance list [--max-items]
[--next-token]
[--resource-group]
範例
列出訂閱中所有 Azure 裸機實例
az baremetalinstance list
列出訂閱與資源群組中的所有 Azure 裸機實例
az baremetalinstance list -g myResourceGroup
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
命令輸出中要傳回的項目總數。 如果可用的專案總數超過指定的值,則會在命令的輸出中提供令牌。 若要繼續分頁,請在後續命令的 --next-token 自變數中提供令牌值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Pagination Arguments |
標記,指定要開始分頁的位置。 這是先前截斷回應中的令牌值。
| 屬性 | 值 |
|---|---|
| 參數群組: | Pagination Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az baremetalinstance restart
重新啟動 Azure 裸機實例的操作。
az baremetalinstance restart [--acquire-policy-token]
[--change-reference]
[--force-state {active, inactive}]
[--ids]
[--instance-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
範例
Restart an Azure Bare Metal Instance
az baremetalinstance restart -g myResourceGroup -n myABMInstance
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
是否要藉由關閉所有進程來強制重新啟動。
| 屬性 | 值 |
|---|---|
| 參數群組: | ForceParameter Arguments |
| 接受的值: | active, inactive |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Azure 裸機實例的名稱,也稱為 ResourceName。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az baremetalinstance show
為指定的訂閱、資源群組和實例名稱取得一個 Azure 裸機實例。
az baremetalinstance show [--ids]
[--instance-name]
[--resource-group]
[--subscription]
範例
取得一個 Azure 裸機實例
az baremetalinstance show -g myResourceGroup -n myAzureBareMetalInstance
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Azure 裸機實例的名稱,也稱為 ResourceName。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az baremetalinstance shutdown
關閉 Azure 裸機實例的操作。
az baremetalinstance shutdown [--acquire-policy-token]
[--change-reference]
[--ids]
[--instance-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
範例
關閉 Azure 裸機實例
az baremetalinstance shutdown --resource-group myResourceGroup --instance-name myABMInstance
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Azure 裸機實例的名稱,也稱為 ResourceName。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az baremetalinstance start
啟動 Azure 裸機實例的操作。
az baremetalinstance start [--acquire-policy-token]
[--change-reference]
[--ids]
[--instance-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
範例
Start an Azure Bare Metal instance
az baremetalinstance start --resource-group myResourceGroup --instance-name myABMInstance
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Azure 裸機實例的名稱,也稱為 ResourceName。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az baremetalinstance update
更新一個 Azure 裸機實例,以指定訂閱、資源群組和實例名稱。
az baremetalinstance update [--acquire-policy-token]
[--add]
[--change-reference]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--instance-name]
[--remove]
[--resource-group]
[--set]
[--subscription]
[--tags]
範例
若要將索引鍵/值組新增至特定 BareMetal 實例的 [標記] 字段:
az baremetalinstance update -g $RESOURCE_GROUP -n $BM_INSTANCE_NAME --set tags.newKey=value
若要在特定 BareMetal 實例的 [標記] 字段中更新機碼/值組:
az baremetalinstance update --resource-group $RESOURCE_GROUP --instance-name $BM_INSTANCE_NAME --set tags.key=updatedValue
若要從特定 BareMetal 實例的 [標記] 字段中刪除索引鍵/值組:
az baremetalinstance update --resource-group $RESOURCE_GROUP --instance-name $BM_INSTANCE_NAME --remove tags.key
若要刪除特定 BareMetal 實例之 [標記] 字段中的所有索引鍵/值組:
az baremetalinstance update --resource-group $RESOURCE_GROUP --instance-name $BM_INSTANCE_NAME --set tags={}
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
自動取得 Azure 原則 令牌以進行此資源操作。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例: --add property.listProperty <key=value, string or JSON string>.
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
相關變更的 ID 是為此資源操作所參考的。
| 屬性 | 值 |
|---|---|
| 參數群組: | Global Policy Arguments |
使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Azure 裸機實例的名稱,也稱為 ResourceName。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove> 或 --remove propertyToRemove。
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
指定要設定的屬性路徑和值,以更新物件。 範例: --set property1.property2=<value>.
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源標籤。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
| 屬性 | 值 |
|---|---|
| 參數群組: | RequestBodyParameters Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |