你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az webapp deployment slot

管理 Web 应用部署槽位。

命令

名称 说明 类型 状态
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

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

Web 应用的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 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]
                                 [--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

Web 应用的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--slot -s

槽的名称。

可选参数

--configuration-source

要从中克隆配置的源槽。 使用 Web 应用的名称引用生产槽。

--deployment-container-image-name -i

容器映像名称,例如 publisher/image-name:tag。

--docker-registry-server-password -w

容器注册表服务器密码。

--docker-registry-server-user -u

容器注册表服务器用户名。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 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

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

Web 应用的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 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

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

Web 应用的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 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

交换类型。 首先使用“预览”在源槽上应用目标槽的设置;使用“swap”完成它;使用“reset”重置交换。

接受的值: preview, reset, swap
默认值: swap
--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

Web 应用的名称。

--preserve-vnet

在交换期间保留槽虚拟网络,默认为“true”。

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

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。