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

az functionapp deployment slot

管理函数应用部署槽位。

命令

名称 说明 类型 状态
az functionapp deployment slot auto-swap

配置部署槽自动交换。

核心 GA
az functionapp deployment slot create

创建部署槽。

核心 GA
az functionapp deployment slot delete

删除部署槽位。

核心 GA
az functionapp deployment slot list

列出所有部署槽位。

核心 GA
az functionapp deployment slot swap

交换函数应用的部署槽位。

核心 GA

az functionapp deployment slot auto-swap

配置部署槽自动交换。

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

必需参数

--slot -s

槽的名称。

可选参数

--auto-swap-slot

要自动交换的目标槽。

默认值: production
--disable

禁用自动交换。

--ids

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

--name -n

函数应用的名称。

--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 functionapp deployment slot create

创建部署槽。

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

示例

创建部署槽。 (自动生成)

az functionapp deployment slot create --name MyFunctionapp --resource-group MyResourceGroup --slot staging

必需参数

--name -n

函数应用的名称。

--resource-group -g

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

--slot -s

槽的名称。

可选参数

--configuration-source

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

--deployment-container-image-name
已放弃

选项“--deployment-container-image-name”已弃用,将在将来的版本中删除。 请改用“--image”。

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

--docker-registry-server-password
已放弃

选项“--docker-registry-server-password”已弃用,将在将来的版本中删除。 请改用“--registry-password”。

容器注册表服务器密码。

--docker-registry-server-user
已放弃

选项“--docker-registry-server-user”已弃用,将在将来的版本中删除。 请改用“--registry-username”。

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

--image -i

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

--registry-password -d

容器注册表服务器密码。

--registry-username -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 functionapp deployment slot delete

删除部署槽位。

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

示例

删除部署槽位。 (自动生成)

az functionapp deployment slot delete --name MyFunctionapp --resource-group MyResourceGroup --slot staging

必需参数

--slot -s

槽的名称。

可选参数

--ids

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

--name -n

函数应用的名称。

--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 functionapp deployment slot list

列出所有部署槽位。

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

示例

列出所有部署槽位。 (自动生成)

az functionapp deployment slot list --name MyFunctionapp --resource-group MyResourceGroup

可选参数

--ids

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

--name -n

函数应用的名称。

--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 functionapp deployment slot swap

交换函数应用的部署槽位。

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

示例

将过渡槽交换到 MyUniqueApp 函数应用的生产中。

az functionapp 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

函数应用的名称。

--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 获取完整的调试日志。