Share via


az webapp deployment slot

管理 Web 應用程式部署位置。

命令

名稱 Description 類型 狀態
az webapp deployment slot auto-swap

設定部署位置自動交換。

核心 GA
az webapp deployment slot create

建立部署位置。

核心 GA
az webapp deployment slot delete

刪除部署位置。

核心 GA
az webapp deployment slot list

列出所有部署位置。

核心 GA
az webapp deployment slot swap

交換 Web 應用程式的部署位置。

核心 GA

az webapp deployment slot auto-swap

設定部署位置自動交換。

az webapp deployment slot auto-swap --slot
                                    [--auto-swap-slot]
                                    [--disable]
                                    [--ids]
                                    [--name]
                                    [--resource-group]
                                    [--subscription]

範例

設定部署位置自動交換。 ( 自動產生 )

az webapp deployment slot auto-swap --name MyWebapp --resource-group MyResourceGroup --slot staging

必要參數

--slot -s

位置的名稱。

選擇性參數

--auto-swap-slot

要自動交換的目標位置。

預設值: production
--disable

停用自動交換。

--ids

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

--name -n

Webapp 的名稱。

--resource-group -g

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

--subscription

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

全域參數
--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 webapp deployment slot create

建立部署位置。

az webapp deployment slot create --name
                                 --resource-group
                                 --slot
                                 [--configuration-source]
                                 [--container-image-name]
                                 [--container-registry-password]
                                 [--container-registry-url]
                                 [--container-registry-user]
                                 [--deployment-container-image-name]
                                 [--docker-registry-server-password]
                                 [--docker-registry-server-user]

範例

建立部署位置。 ( 自動產生 )

az webapp deployment slot create --name MyWebapp --resource-group MyResourceGroup --slot staging

必要參數

--name -n

Webapp 的名稱。

--resource-group -g

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

--slot -s

位置的名稱。

選擇性參數

--configuration-source

要從中複製組態的來源位置。 使用 Web 應用程式的名稱來參考生產位置。

--container-image-name -c

容器自定義映像名稱和選擇性標記名稱(例如 /:)。

--container-registry-password -w

容器登錄伺服器密碼。

--container-registry-url -r

容器登錄伺服器 URL。

--container-registry-user -u

容器登錄伺服器用戶名稱。

--deployment-container-image-name -i
已被取代

選項 '--deployment-container-image-name' 已被取代,未來版本將會移除。

容器映射名稱,例如 publisher/image-name:tag。

--docker-registry-server-password
已被取代

選項 '--docker-registry-server-password' 已被取代,將在未來的版本中移除。 請改用 『--container-registry-password』。

容器登錄伺服器密碼。

--docker-registry-server-user
已被取代

選項 '--docker-registry-server-user' 已被取代,並將在未來版本中移除。 請改用 『--container-registry-user』。

容器登錄伺服器用戶名稱。

全域參數
--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 webapp deployment slot delete

刪除部署位置。

az webapp deployment slot delete --slot
                                 [--ids]
                                 [--name]
                                 [--resource-group]
                                 [--subscription]

範例

刪除部署位置。 ( 自動產生 )

az webapp deployment slot delete --name MyWebapp --resource-group MyResourceGroup --slot staging

必要參數

--slot -s

位置的名稱。

選擇性參數

--ids

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

--name -n

Webapp 的名稱。

--resource-group -g

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

--subscription

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

全域參數
--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 webapp deployment slot list

列出所有部署位置。

az webapp deployment slot list [--ids]
                               [--name]
                               [--resource-group]
                               [--subscription]

範例

列出所有部署位置。 ( 自動產生 )

az webapp deployment slot list --name MyWebapp --resource-group MyResourceGroup

選擇性參數

--ids

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

--name -n

Webapp 的名稱。

--resource-group -g

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

--subscription

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

全域參數
--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 webapp deployment slot swap

交換 Web 應用程式的部署位置。

az webapp deployment slot swap --slot
                               [--action {preview, reset, swap}]
                               [--ids]
                               [--name]
                               [--preserve-vnet {false, true}]
                               [--resource-group]
                               [--subscription]
                               [--target-slot]

範例

將預備位置交換至 MyUniqueApp Web 應用程式的生產環境。

az webapp deployment slot swap  -g MyResourceGroup -n MyUniqueApp --slot staging \
    --target-slot production

必要參數

--slot -s

位置的名稱。

選擇性參數

--action

交換類型。 使用 『preview』 先在來源位置上套用目標位置的設定;使用 'swap' 來完成它;使用 『reset』 來重設交換。

接受的值: preview, reset, swap
預設值: swap
--ids

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

--name -n

Webapp 的名稱。

--preserve-vnet

在交換期間保留位置 虛擬網絡,預設為 'true'。

接受的值: false, true
--resource-group -g

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

--subscription

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

--target-slot

要交換的目標位置,預設為「生產環境」。

全域參數
--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 來取得完整偵錯記錄。