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

az containerapp connection

注意

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

用于管理容器应用连接的命令。

命令

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

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

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

创建到 app-insights 的容器应用连接。

核心 GA
az containerapp connection create appconfig

创建到 appconfig 的 containerapp 连接。

核心 GA
az containerapp connection create confluent-cloud

创建到 confluent-cloud 的 containerapp 连接。

核心 GA
az containerapp connection create cosmos-cassandra

创建到 cosmos-cassandra 的 containerapp 连接。

核心 GA
az containerapp connection create cosmos-gremlin

创建到 cosmos-gremlin 的 containerapp 连接。

核心 GA
az containerapp connection create cosmos-mongo

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

核心 GA
az containerapp connection create cosmos-sql

创建到 cosmos-sql 的 containerapp 连接。

核心 GA
az containerapp connection create cosmos-table

创建到 cosmos-table 的 containerapp 连接。

核心 GA
az containerapp connection create eventhub

创建到 eventhub 的 containerapp 连接。

核心 GA
az containerapp connection create keyvault

创建到 keyvault 的 containerapp 连接。

核心 GA
az containerapp connection create mysql

创建到 mysql 的 containerapp 连接。

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

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

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

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

扩展 GA
az containerapp connection create postgres

创建到 postgres 的容器应用连接。

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

创建到 postgres 的容器应用连接。

扩展 GA
az containerapp connection create postgres-flexible

创建到 postgres 灵活部署的容器应用连接。

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

创建到 postgres 灵活部署的容器应用连接。

扩展 GA
az containerapp connection create redis

创建到 redis 的 containerapp 连接。

核心 GA
az containerapp connection create redis-enterprise

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

核心 GA
az containerapp connection create servicebus

创建到 servicebus 的 containerapp 连接。

核心 GA
az containerapp connection create signalr

创建到 signalr 的 containerapp 连接。

核心 GA
az containerapp connection create sql

创建到 sql 的 containerapp 连接。

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

创建到 sql 的 containerapp 连接。

扩展 GA
az containerapp connection create storage-blob

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

核心 GA
az containerapp connection create storage-file

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

核心 GA
az containerapp connection create storage-queue

创建到存储队列的 containerapp 连接。

核心 GA
az containerapp connection create storage-table

创建到 storage-table 的 containerapp 连接。

核心 GA
az containerapp connection create webpubsub

创建到 webpubsub 的 containerapp 连接。

核心 GA
az containerapp connection delete

删除容器应用连接。

核心 GA
az containerapp connection list

列出容器应用的连接。

核心 GA
az containerapp connection list-configuration

列出容器应用连接的源配置。

核心 GA
az containerapp connection list-support-types

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

核心 GA
az containerapp connection show

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

核心 GA
az containerapp connection update

更新 containerapp 连接。

核心 GA
az containerapp connection update app-insights

将 containerapp 更新到 app-insights 连接。

核心 GA
az containerapp connection update appconfig

将 containerapp 更新为 appconfig 连接。

核心 GA
az containerapp connection update confluent-cloud

将 containerapp 更新为 confluent-cloud 连接。

核心 GA
az containerapp connection update cosmos-cassandra

将 containerapp 更新为 cosmos-cassandra 连接。

核心 GA
az containerapp connection update cosmos-gremlin

将 containerapp 更新为 cosmos-gremlin 连接。

核心 GA
az containerapp connection update cosmos-mongo

将 containerapp 更新为 cosmos-mongo 连接。

核心 GA
az containerapp connection update cosmos-sql

将 containerapp 更新为 cosmos-sql 连接。

核心 GA
az containerapp connection update cosmos-table

将 containerapp 更新为 cosmos-table 连接。

核心 GA
az containerapp connection update eventhub

将 containerapp 更新为 eventhub 连接。

核心 GA
az containerapp connection update keyvault

将 containerapp 更新为 keyvault 连接。

核心 GA
az containerapp connection update mysql

将 containerapp 更新到 mysql 连接。

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

将 containerapp 更新为 mysql 灵活连接。

核心 GA
az containerapp connection update postgres

将 containerapp 更新为 postgres 连接。

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

将 containerapp 更新为 postgres 灵活连接。

核心 GA
az containerapp connection update redis

将 containerapp 更新为 redis 连接。

核心 GA
az containerapp connection update redis-enterprise

将 containerapp 更新为 redis-enterprise 连接。

核心 GA
az containerapp connection update servicebus

将 containerapp 更新到 servicebus 连接。

核心 GA
az containerapp connection update signalr

将 containerapp 更新为信号器连接。

核心 GA
az containerapp connection update sql

将 containerapp 更新到 sql 连接。

核心 GA
az containerapp connection update storage-blob

将 containerapp 更新到 storage-blob 连接。

核心 GA
az containerapp connection update storage-file

将 containerapp 更新为存储文件连接。

核心 GA
az containerapp connection update storage-queue

将 containerapp 更新为存储队列连接。

核心 GA
az containerapp connection update storage-table

将 containerapp 更新到存储表连接。

核心 GA
az containerapp connection update webpubsub

将 containerapp 更新到 webpubsub 连接。

核心 GA
az containerapp connection validate

验证容器应用连接。

核心 GA
az containerapp connection wait

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

核心 GA

az containerapp connection delete

删除容器应用连接。

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

示例

以交互方式删除 containerapp 连接

az containerapp connection delete

按连接名称删除 containerapp 连接

az containerapp connection delete -g ContainerAppRG -n MyContainerApp --connection MyConnection

按连接 ID 删除 containerapp 连接

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

可选参数

--connection

containerapp 连接的名称。

--id

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

--name -n

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

--no-wait

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

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

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

--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 containerapp connection list

列出容器应用的连接。

az containerapp connection list [--name]
                                [--resource-group]
                                [--source-id]

示例

以交互方式列出 containerapp 连接

az containerapp connection list

按源资源名称列出容器应用连接

az containerapp connection list -g ContainerAppRG -n MyContainerApp

按源资源 ID 列出容器应用连接

az containerapp connection list --source-id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.App/containerApps/{app}

可选参数

--name -n

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

--resource-group -g

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

--source-id

containerapp 的资源 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 containerapp connection list-configuration

列出容器应用连接的源配置。

az containerapp connection list-configuration [--connection]
                                              [--id]
                                              [--name]
                                              [--resource-group]

示例

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

az containerapp connection list-configuration

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

az containerapp connection list-configuration -g ContainerAppRG -n MyContainerApp --connection MyConnection

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

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

可选参数

--connection

containerapp 连接的名称。

--id

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

--name -n

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

--resource-group -g

包含容器应用的资源组。 如果未指定“--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 containerapp connection list-support-types

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

az containerapp 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}]

示例

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

az containerapp connection list-support-types -o table

列出特定目标资源类型的容器应用支持的身份验证类型

az containerapp 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 containerapp connection show

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

az containerapp connection show [--connection]
                                [--id]
                                [--name]
                                [--resource-group]

示例

以交互方式获取连接

az containerapp connection show

按连接名称获取连接

az containerapp connection show -g ContainerAppRG -n MyContainerApp --connection MyConnection

按连接 ID 获取连接

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

可选参数

--connection

containerapp 连接的名称。

--id

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

--name -n

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

--resource-group -g

包含容器应用的资源组。 如果未指定“--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 containerapp connection validate

验证容器应用连接。

az containerapp connection validate [--connection]
                                    [--id]
                                    [--name]
                                    [--resource-group]

示例

以交互方式验证连接

az containerapp connection validate

按连接名称验证连接

az containerapp connection validate -g ContainerAppRG -n MyContainerApp --connection MyConnection

按连接 ID 验证连接

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

可选参数

--connection

containerapp 连接的名称。

--id

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

--name -n

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

--resource-group -g

包含容器应用的资源组。 如果未指定“--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 containerapp connection wait

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

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

示例

等待连接成功创建。

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

可选参数

--connection

containerapp 连接的名称。

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

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

--resource-group -g

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

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