az vm application

管理 VM 的應用程式。

命令

名稱 Description 類型 狀態
az vm application list

列出 VM 的應用程式。

核心 GA
az vm application set

設定 VM 的應用程式。

核心 GA

az vm application list

列出 VM 的應用程式。

az vm application list --name
                       --resource-group

範例

列出 VM 的應用程式

az vm application list -g MyResourceGroup -n MyVm

必要參數

--name --vm-name -n

虛擬機器的名稱。 您可以使用 來設定預設值 az configure --defaults vm=<name>

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az vm application set

設定 VM 的應用程式。

az vm application set --app-version-ids
                      [--app-config-overrides]
                      [--ids]
                      [--name]
                      [--order-applications]
                      [--resource-group]
                      [--subscription]
                      [--treat-deployment-as-failure]

範例

設定 vm 的應用程式

az vm application set -g MyResourceGroup -n MyVm --app-version-ids /subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0 /subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.1

使用 config 設定 VM 的應用程式

az vm application set -g MyResourceGroup -n MyVm --app-version-ids /subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0 /subscriptions/subid/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.1 --app-config-overrides https://mystorageaccount.blob.core.windows.net/configurations/settings.config null

必要參數

--app-version-ids

要設定為 VM 的空間分隔應用程式版本識別碼。

選擇性參數

--app-config-overrides

每個應用程式版本識別碼的空間分隔應用程式組態覆寫。 它應該有與應用程式版本識別碼相同的專案數目。 Null 適用于沒有組態覆寫的應用程式。

--ids

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

--name -n

虛擬機器的名稱。 您可以使用 來設定預設值 az configure --defaults vm=<name>

--order-applications

是否要在每個資源庫應用程式設定訂單索引。 如果指定,則第一個應用程式版本識別碼會指定訂單 = 1,然後是下一個 2,依序排序。 當應用程式版本識別碼所指定的 VMApplication 必須依特定順序安裝時,會使用此參數;會先安裝最低順序。

預設值: False
--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

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

--treat-deployment-as-failure

與應用程式版本識別碼相對應之 true 或 false 的空間分隔清單。 如果設定為 true,安裝或更新資源庫應用程式版本作業將會失敗此作業。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。