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

az webapp connection

注意

此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 详细了解扩展。

用于管理 Web 应用连接的命令。

命令

名称 说明 类型 状态
az webapp connection create

在 Web 应用和目标资源之间创建连接。

核心和扩展 GA
az webapp connection create app-insights

创建与 app-insights 的 Web 应用连接。

核心 GA
az webapp connection create appconfig

创建与 appconfig 的 Web 应用连接。

核心 GA
az webapp connection create confluent-cloud

创建到 confluent-cloud 的 Webapp 连接。

核心 GA
az webapp connection create cosmos-cassandra

创建到 cosmos-cassandra 的 Web 应用连接。

核心 GA
az webapp connection create cosmos-gremlin

创建与 cosmos-gremlin 的 Web 应用连接。

核心 GA
az webapp connection create cosmos-mongo

创建与 cosmos-mongo 的 Web 应用连接。

核心 GA
az webapp connection create cosmos-sql

创建与 cosmos-sql 的 Web 应用连接。

核心 GA
az webapp connection create cosmos-table

创建与 cosmos-table 的 Web 应用连接。

核心 GA
az webapp connection create eventhub

创建到 eventhub 的 Web 应用连接。

核心 GA
az webapp connection create keyvault

创建到 keyvault 的 Web 应用连接。

核心 GA
az webapp connection create mysql

创建到 mysql 的 Web 应用连接。

核心 已放弃
az webapp connection create mysql-flexible

创建与 mysql 灵活连接的 Webapp 连接。

核心 GA
az webapp connection create mysql-flexible (serviceconnector-passwordless 扩展)

创建与 mysql 灵活连接的 Webapp 连接。

扩展 GA
az webapp connection create postgres

创建到 postgres 的 Web 应用连接。

核心 已放弃
az webapp connection create postgres (serviceconnector-passwordless 扩展)

创建到 postgres 的 Web 应用连接。

扩展 GA
az webapp connection create postgres-flexible

创建与 postgres 灵活连接的 Web 应用连接。

核心 GA
az webapp connection create postgres-flexible (serviceconnector-passwordless 扩展)

创建与 postgres 灵活连接的 Web 应用连接。

扩展 GA
az webapp connection create redis

创建与 redis 的 Web 应用连接。

核心 GA
az webapp connection create redis-enterprise

创建与 redis-enterprise 的 Web 应用连接。

核心 GA
az webapp connection create servicebus

创建到 servicebus 的 Web 应用连接。

核心 GA
az webapp connection create signalr

创建到 signalr 的 Web 应用连接。

核心 GA
az webapp connection create sql

创建与 sql 的 Web 应用连接。

核心 GA
az webapp connection create sql (serviceconnector-passwordless 扩展)

创建与 sql 的 Web 应用连接。

扩展 GA
az webapp connection create storage-blob

创建与 storage-blob 的 Web 应用连接。

核心 GA
az webapp connection create storage-file

创建到存储文件的 Web 应用连接。

核心 GA
az webapp connection create storage-queue

创建与存储队列的 Web 应用连接。

核心 GA
az webapp connection create storage-table

创建与存储表的 Web 应用连接。

核心 GA
az webapp connection create webpubsub

创建与 webpubsub 的 Web 应用连接。

核心 GA
az webapp connection delete

删除 Web 应用连接。

核心 GA
az webapp connection list

列出 Web 应用的连接。

核心 GA
az webapp connection list-configuration

列出 Webapp 连接的源配置。

核心 GA
az webapp connection list-support-types

列出 Web 应用连接支持的客户端类型和身份验证类型。

核心 GA
az webapp connection show

获取 Web 应用连接的详细信息。

核心 GA
az webapp connection update

更新 Web 应用连接。

核心 GA
az webapp connection update app-insights

将 Web 应用更新到 app-insights 连接。

核心 GA
az webapp connection update appconfig

将 Web 应用更新为 appconfig 连接。

核心 GA
az webapp connection update confluent-cloud

将 webapp 更新为 confluent-cloud 连接。

核心 GA
az webapp connection update cosmos-cassandra

将 Web 应用更新为 cosmos-cassandra 连接。

核心 GA
az webapp connection update cosmos-gremlin

将 webapp 更新为 cosmos-gremlin 连接。

核心 GA
az webapp connection update cosmos-mongo

将 Web 应用更新为 cosmos-mongo 连接。

核心 GA
az webapp connection update cosmos-sql

将 Web 应用更新为 cosmos-sql 连接。

核心 GA
az webapp connection update cosmos-table

将 Web 应用更新为 cosmos-table 连接。

核心 GA
az webapp connection update eventhub

将 Web 应用更新到 eventhub 连接。

核心 GA
az webapp connection update keyvault

将 Web 应用更新为 keyvault 连接。

核心 GA
az webapp connection update mysql

将 Web 应用更新到 mysql 连接。

核心 已放弃
az webapp connection update mysql-flexible

将 webapp 更新为 mysql 灵活连接。

核心 GA
az webapp connection update postgres

将 Web 应用更新为 postgres 连接。

核心 已放弃
az webapp connection update postgres-flexible

将 Web 应用更新为具有 postgres 灵活连接。

核心 GA
az webapp connection update redis

将 Web 应用更新为 redis 连接。

核心 GA
az webapp connection update redis-enterprise

将 Web 应用更新为 redis-enterprise 连接。

核心 GA
az webapp connection update servicebus

将 Web 应用更新到 servicebus 连接。

核心 GA
az webapp connection update signalr

将 Web 应用更新为信号器连接。

核心 GA
az webapp connection update sql

将 Web 应用更新到 sql 连接。

核心 GA
az webapp connection update storage-blob

将 Web 应用更新到 storage-blob 连接。

核心 GA
az webapp connection update storage-file

将 Web 应用更新为存储文件连接。

核心 GA
az webapp connection update storage-queue

将 Web 应用更新为存储队列连接。

核心 GA
az webapp connection update storage-table

将 Web 应用更新为存储表连接。

核心 GA
az webapp connection update webpubsub

将 Web 应用更新为 webpubsub 连接。

核心 GA
az webapp connection validate

验证 Web 应用连接。

核心 GA
az webapp connection wait

将 CLI 置于等待状态,直到满足连接条件。

核心 GA

az webapp connection delete

删除 Web 应用连接。

az webapp connection delete [--connection]
                            [--id]
                            [--name]
                            [--no-wait]
                            [--resource-group]
                            [--slot]
                            [--yes]

示例

以交互方式删除 Web 应用连接

az webapp connection delete

按连接名称删除 Web 应用连接

az webapp connection delete -g WebAppRG -n MyWebApp --connection MyConnection

按连接 ID 删除 Web 应用连接

az webapp connection delete --id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.Web/sites/{site}/providers/Microsoft.ServiceLinker/linkers/{linker}

可选参数

--connection

Web 应用连接的名称。

--id

连接的资源 ID。 如果未指定“--id”,则需要 ['--resource-group'、'--name'、'--connection']。

--name -n

Web 应用的名称。 如果未指定“--id”,则为必需。没有。

--no-wait

不等待长时间运行的操作完成。

默认值: False
--resource-group -g

包含 Web 应用的资源组。 如果未指定“--id”,则为必需。没有。

--slot

槽的名称。 如果未指定,则默认为生产槽。

--yes -y

不提示确认。

默认值: False
全局参数
--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 connection list

列出 Web 应用的连接。

az webapp connection list [--name]
                          [--resource-group]
                          [--slot]
                          [--source-id]

示例

以交互方式列出 Web 应用连接

az webapp connection list

按源资源名称列出 Webapp 连接

az webapp connection list -g WebAppRG -n MyWebApp

按源资源 ID 列出 Web 应用连接

az webapp connection list --source-id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.Web/sites/{site}

可选参数

--name -n

Web 应用的名称。 如果未指定“--source-id”,则为必需。没有。

--resource-group -g

包含 Web 应用的资源组。 如果未指定“--source-id”,则为必需。没有。

--slot

槽的名称。 如果未指定,则默认为生产槽。

--source-id

Web 应用的资源 ID。 如果未指定 ['--resource-group', '--name'] ,则为必需。

全局参数
--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 connection list-configuration

列出 Webapp 连接的源配置。

az webapp connection list-configuration [--connection]
                                        [--id]
                                        [--name]
                                        [--resource-group]
                                        [--slot]

示例

以交互方式列出连接的源配置

az webapp connection list-configuration

按连接名称列出连接的源配置

az webapp connection list-configuration -g WebAppRG -n MyWebApp --connection MyConnection

按连接 ID 列出连接的源配置

az webapp connection list-configuration --id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.Web/sites/{site}/providers/Microsoft.ServiceLinker/linkers/{linker}

可选参数

--connection

Web 应用连接的名称。

--id

连接的资源 ID。 如果未指定“--id”,则需要 ['--resource-group'、'--name'、'--connection']。

--name -n

Web 应用的名称。 如果未指定“--id”,则为必需。没有。

--resource-group -g

包含 Web 应用的资源组。 如果未指定“--id”,则为必需。没有。

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

az webapp connection list-support-types

列出 Web 应用连接支持的客户端类型和身份验证类型。

az webapp connection list-support-types [--target-type {app-insights, appconfig, confluent-cloud, cosmos-cassandra, cosmos-gremlin, cosmos-mongo, cosmos-sql, cosmos-table, eventhub, keyvault, mysql, mysql-flexible, postgres, postgres-flexible, redis, redis-enterprise, servicebus, signalr, sql, storage-blob, storage-file, storage-queue, storage-table, webpubsub}]

示例

列出所有 Web 应用支持的目标资源类型和身份验证类型

az webapp connection list-support-types -o table

列出特定目标资源类型的 Webapp 支持的身份验证类型

az webapp connection list-support-types --target-type storage-blob -o table

可选参数

--target-type -t

目标资源类型。

接受的值: app-insights, appconfig, confluent-cloud, cosmos-cassandra, cosmos-gremlin, cosmos-mongo, cosmos-sql, cosmos-table, eventhub, keyvault, mysql, mysql-flexible, postgres, postgres-flexible, redis, redis-enterprise, servicebus, signalr, sql, storage-blob, storage-file, storage-queue, storage-table, webpubsub
全局参数
--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 connection show

获取 Web 应用连接的详细信息。

az webapp connection show [--connection]
                          [--id]
                          [--name]
                          [--resource-group]
                          [--slot]

示例

以交互方式获取连接

az webapp connection show

按连接名称获取连接

az webapp connection show -g WebAppRG -n MyWebApp --connection MyConnection

按连接 ID 获取连接

az webapp connection show --id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.Web/sites/{site}/providers/Microsoft.ServiceLinker/linkers/{linker}

可选参数

--connection

Web 应用连接的名称。

--id

连接的资源 ID。 如果未指定“--id”,则需要 ['--resource-group'、'--name'、'--connection']。

--name -n

Web 应用的名称。 如果未指定“--id”,则为必需。没有。

--resource-group -g

包含 Web 应用的资源组。 如果未指定“--id”,则为必需。没有。

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

az webapp connection validate

验证 Web 应用连接。

az webapp connection validate [--connection]
                              [--id]
                              [--name]
                              [--resource-group]
                              [--slot]

示例

以交互方式验证连接

az webapp connection validate

按连接名称验证连接

az webapp connection validate -g WebAppRG -n MyWebApp --connection MyConnection

按连接 ID 验证连接

az webapp connection validate --id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.Web/sites/{site}/providers/Microsoft.ServiceLinker/linkers/{linker}

可选参数

--connection

Web 应用连接的名称。

--id

连接的资源 ID。 如果未指定“--id”,则需要 ['--resource-group'、'--name'、'--connection']。

--name -n

Web 应用的名称。 如果未指定“--id”,则为必需。没有。

--resource-group -g

包含 Web 应用的资源组。 如果未指定“--id”,则为必需。没有。

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

az webapp connection wait

将 CLI 置于等待状态,直到满足连接条件。

az webapp connection wait [--connection]
                          [--created]
                          [--custom]
                          [--deleted]
                          [--exists]
                          [--id]
                          [--interval]
                          [--name]
                          [--resource-group]
                          [--slot]
                          [--timeout]
                          [--updated]

示例

等待连接成功创建。

az webapp connection wait --id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.Web/sites/{site}/providers/Microsoft.ServiceLinker/linkers/{linker} --created

可选参数

--connection

Web 应用连接的名称。

--created

等待在“Succeeded”中使用“provisioningState”创建。

默认值: False
--custom

等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到删除为止。

默认值: False
--exists

等待资源存在。

默认值: False
--id

连接的资源 ID。 如果未指定“--id”,则需要 ['--resource-group'、'--name'、'--connection']。

--interval

轮询间隔(以秒为单位)。

默认值: 30
--name -n

Web 应用的名称。 如果未指定“--id”,则为必需。没有。

--resource-group -g

包含 Web 应用的资源组。 如果未指定“--id”,则为必需。没有。

--slot

槽的名称。 如果未指定,则默认为生产槽。

--timeout

最大等待(以秒为单位)。

默认值: 3600
--updated

等到 provisioningState 更新为“Succeeded”。

默认值: False
全局参数
--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 获取完整的调试日志。