az containerapp
Note
此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 了解更多关于扩展的信息。
管理 Azure 容器应用。
命令
az containerapp browse
在浏览器中打开容器应用(如果可能)。
az containerapp browse [--ids]
[--name]
[--resource-group]
[--subscription]
示例
在浏览器中打开容器应用
az containerapp browse -n my-containerapp -g MyResourceGroup
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp create
创建容器应用。
az containerapp create --name
--resource-group
[--allow-insecure {false, true}]
[--args]
[--command]
[--container-name]
[--cpu]
[--dal --dapr-enable-api-logging]
[--dapr-app-id]
[--dapr-app-port]
[--dapr-app-protocol {grpc, http}]
[--dapr-http-max-request-size --dhmrs]
[--dapr-http-read-buffer-size --dhrbs]
[--dapr-log-level {debug, error, info, warn}]
[--enable-dapr {false, true}]
[--env-vars]
[--environment]
[--exposed-port]
[--image]
[--ingress {external, internal}]
[--max-replicas]
[--memory]
[--min-replicas]
[--no-wait]
[--registry-identity]
[--registry-password]
[--registry-server]
[--registry-username]
[--revision-suffix]
[--revisions-mode {multiple, single}]
[--scale-rule-auth --sra]
[--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc]
[--scale-rule-metadata --srm]
[--scale-rule-name --srn]
[--scale-rule-type --srt]
[--secret-volume-mount]
[--secrets]
[--system-assigned]
[--tags]
[--target-port]
[--termination-grace-period --tgp]
[--transport {auto, http, http2, tcp}]
[--user-assigned]
[--workload-profile-name]
[--yaml]
示例
创建容器应用并检索其完全限定的域名。
az containerapp create -n my-containerapp -g MyResourceGroup \
--image myregistry.azurecr.io/my-app:v1.0 --environment MyContainerappEnv \
--ingress external --target-port 80 \
--registry-server myregistry.azurecr.io --registry-username myregistry --registry-password $REGISTRY_PASSWORD \
--query properties.configuration.ingress.fqdn
创建具有资源要求和副本计数限制的容器应用。
az containerapp create -n my-containerapp -g MyResourceGroup \
--image nginx --environment MyContainerappEnv \
--cpu 0.5 --memory 1.0Gi \
--min-replicas 4 --max-replicas 8
使用机密和环境变量创建容器应用。
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-app:v1.0 --environment MyContainerappEnv \
--secrets mysecret=secretvalue1 anothersecret="secret value 2" \
--env-vars GREETING="Hello, world" SECRETENV=secretref:anothersecret
使用 YAML 配置创建容器应用。 示例 YAML 配置 - https://aka.ms/azure-container-apps-yaml
az containerapp create -n my-containerapp -g MyResourceGroup \
--environment MyContainerappEnv \
--yaml "path/to/yaml/file.yml"
使用 http 缩放规则创建容器应用
az containerapp create -n myapp -g mygroup --environment myenv --image nginx \
--scale-rule-name my-http-rule \
--scale-rule-http-concurrency 50
使用自定义缩放规则创建容器应用
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-queue-processor --environment MyContainerappEnv \
--min-replicas 4 --max-replicas 8 \
--scale-rule-name queue-based-autoscaling \
--scale-rule-type azure-queue \
--scale-rule-metadata "accountName=mystorageaccountname" \
"cloud=AzurePublicCloud" \
"queueLength=5" "queueName=foo" \
--scale-rule-auth "connection=my-connection-string-secret-name"
创建包含机密的容器应用,并将其装载到卷中。
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-app:v1.0 --environment MyContainerappEnv \
--secrets mysecret=secretvalue1 anothersecret="secret value 2" \
--secret-volume-mount "mnt/secrets"
必需参数
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
允许入口流量的不安全连接。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
容器启动命令参数的列表。 空格分隔的值,例如“-c”“mycommand”。 用于清除现有值的空字符串。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
将在启动期间执行的容器上支持的命令列表。 空格分隔的值,例如“/bin/queue”“mycommand”。 用于清除现有值的空字符串。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
核心中所需的 CPU(从 0.25 到 2.0),例如 0.5。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
为 Dapr sidecar 启用 API 日志记录。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
| 默认值: | False |
Dapr 应用程序标识符。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
Dapr 端口用于与应用程序通信。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
Dapr 用于与应用程序通信的协议。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
| 接受的值: | grpc, http |
增加请求正文 http 和 grpc 服务器参数的最大大小(以 MB 为单位)以处理大文件的上传。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
发送多 KB 标头时要处理的 http 标头读取缓冲区的最大大小(以 KB 为单位)。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
设置 Dapr sidecar 的日志级别。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
| 接受的值: | debug, error, info, warn |
指示 Dapr 侧车是否已启用的布尔值。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
| 默认值: | False |
| 接受的值: | false, true |
容器的环境变量列表。 以“key=value”格式分隔的空间值。 用于清除现有值的空字符串。 前缀值为“secretref:”以引用机密。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器应用环境的名称或资源 ID。
其他公开端口。 仅受 tcp 传输协议支持。 如果应用入口为外部,则每个环境必须是唯一的。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
容器映像,例如 publisher/image-name:tag。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
入口类型。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
| 接受的值: | external, internal |
最大副本数。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
0.5 - 4.0 的必需内存以“Gi”结尾,例如 1.0Gi。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
副本的最小数目。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
使用注册表服务器进行身份验证的托管标识,而不是用户名/密码。 分别将资源 ID 或“系统”用于用户定义的标识和系统定义标识。 注册表必须是 ACR。 如果可能,将自动为标识创建“acrpull”角色分配。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
登录到容器注册表的密码。 如果存储为机密,则值必须以“secretref:”开头,后跟机密名称。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
容器注册表服务器主机名,例如 myregistry.azurecr.io。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
要登录到容器注册表的用户名。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
追加到修订名称的用户友好后缀。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器应用的活动修订模式。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
| 默认值: | single |
| 接受的值: | multiple, single |
缩放规则身份验证参数。 身份验证参数的格式必须为“{triggerParameter}={secretRef} {triggerParameter}={secretRef} ...”。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
横向扩展前的最大并发请求数。仅支持 http 和 tcp 缩放规则。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则元数据。 元数据的格式必须为“{key}={value} {key}={value} ...”。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则的类型。 默认值:http。 有关详细信息,请访问 https://learn.microsoft.com/azure/container-apps/scale-app#scale-triggers。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
装载所有机密的路径,例如 mnt/secrets。
容器应用的机密列表。 以“key=value”格式分隔的空间值。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
指示是否分配系统分配标识的布尔值。
| 属性 | 值 |
|---|---|
| 参数组: | Identity Arguments |
| 默认值: | False |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
用于入口流量的应用程序端口。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
副本在强制终止前正常关闭副本的持续时间(以秒为单位)。 (默认值:30)。
用于入口流量的传输协议。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
| 默认值: | auto |
| 接受的值: | auto, http, http2, tcp |
要分配的空间分隔用户标识。
| 属性 | 值 |
|---|---|
| 参数组: | Identity Arguments |
要在其中运行应用的工作负荷配置文件的名称。
具有容器应用的配置的 .yaml 文件的路径。 将忽略所有其他参数。 有关示例,请参阅 https://learn.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp create (containerapp 扩展)
创建容器应用。
az containerapp create --name
--resource-group
[--allow-insecure {false, true}]
[--args]
[--artifact]
[--bind]
[--branch]
[--build-env-vars]
[--command]
[--container-name]
[--context-path]
[--cpu]
[--customized-keys]
[--dal --dapr-enable-api-logging]
[--dapr-app-id]
[--dapr-app-port]
[--dapr-app-protocol {grpc, http}]
[--dapr-http-max-request-size --dhmrs]
[--dapr-http-read-buffer-size --dhrbs]
[--dapr-log-level {debug, error, info, warn}]
[--enable-dapr {false, true}]
[--enable-java-agent {false, true}]
[--enable-java-metrics {false, true}]
[--env-vars]
[--environment]
[--environment-type {connected, managed}]
[--exposed-port]
[--image]
[--ingress {external, internal}]
[--kind {functionapp}]
[--max-inactive-revisions]
[--max-replicas]
[--memory]
[--min-replicas]
[--no-wait]
[--registry-identity]
[--registry-password]
[--registry-server]
[--registry-username]
[--repo]
[--revision-suffix]
[--revisions-mode {labels, multiple, single}]
[--runtime {generic, java}]
[--scale-rule-auth --sra]
[--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc]
[--scale-rule-identity --sri]
[--scale-rule-metadata --srm]
[--scale-rule-name --srn]
[--scale-rule-type --srt]
[--secret-volume-mount]
[--secrets]
[--service-principal-client-id --sp-cid]
[--service-principal-client-secret --sp-sec]
[--service-principal-tenant-id --sp-tid]
[--source]
[--system-assigned]
[--tags]
[--target-label]
[--target-port]
[--termination-grace-period --tgp]
[--token]
[--transport {auto, http, http2, tcp}]
[--user-assigned]
[--workload-profile-name]
[--yaml]
示例
创建容器应用并检索其完全限定的域名。
az containerapp create -n my-containerapp -g MyResourceGroup \
--image myregistry.azurecr.io/my-app:v1.0 --environment MyContainerappEnv \
--ingress external --target-port 80 \
--registry-server myregistry.azurecr.io --registry-username myregistry --registry-password $REGISTRY_PASSWORD \
--query properties.configuration.ingress.fqdn
创建具有资源要求和副本计数限制的容器应用。
az containerapp create -n my-containerapp -g MyResourceGroup \
--image nginx --environment MyContainerappEnv \
--cpu 0.5 --memory 1.0Gi \
--min-replicas 4 --max-replicas 8
使用机密和环境变量创建容器应用。
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-app:v1.0 --environment MyContainerappEnv \
--secrets mysecret=secretvalue1 anothersecret="secret value 2" \
--env-vars GREETING="Hello, world" SECRETENV=secretref:anothersecret
使用 YAML 配置创建容器应用。 示例 YAML 配置 - https://aka.ms/azure-container-apps-yaml
az containerapp create -n my-containerapp -g MyResourceGroup \
--environment MyContainerappEnv \
--yaml "path/to/yaml/file.yml"
使用 http 缩放规则创建容器应用
az containerapp create -n myapp -g mygroup --environment myenv --image nginx \
--scale-rule-name my-http-rule \
--scale-rule-http-concurrency 50
使用自定义缩放规则创建容器应用
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-queue-processor --environment MyContainerappEnv \
--min-replicas 4 --max-replicas 8 \
--scale-rule-name queue-based-autoscaling \
--scale-rule-type azure-queue \
--scale-rule-metadata "accountName=mystorageaccountname" \
"cloud=AzurePublicCloud" \
"queueLength=5" "queueName=foo" \
--scale-rule-auth "connection=my-connection-string-secret-name"
使用标识通过自定义缩放规则创建容器应用以进行身份验证
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-queue-processor --environment MyContainerappEnv \
--user-assigned myUserIdentityResourceId --min-replicas 4 --max-replicas 8 \
--scale-rule-name queue-based-autoscaling \
--scale-rule-type azure-queue \
--scale-rule-metadata "accountName=mystorageaccountname" \
"cloud=AzurePublicCloud" \
"queueLength=5" "queueName=foo" \
--scale-rule-identity myUserIdentityResourceId
创建包含机密的容器应用,并将其装载到卷中。
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-app:v1.0 --environment MyContainerappEnv \
--secrets mysecret=secretvalue1 anothersecret="secret value 2" \
--secret-volume-mount "mnt/secrets"
创建托管在连接环境中的容器应用。
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-app:v1.0 --environment MyContainerappConnectedEnv \
--environment-type connected
从提供的 GitHub 存储库中的新 GitHub Actions 工作流创建容器应用
az containerapp create -n my-containerapp -g MyResourceGroup \
--environment MyContainerappEnv --registry-server MyRegistryServer \
--registry-user MyRegistryUser --registry-pass MyRegistryPass \
--repo https://github.com/myAccount/myRepo
从提供的应用程序源创建容器应用
az containerapp create -n my-containerapp -g MyResourceGroup \
--environment MyContainerappEnv --registry-server MyRegistryServer \
--registry-user MyRegistryUser --registry-pass MyRegistryPass \
--source .
创建启用了 java 指标的容器应用
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-app:v1.0 --environment MyContainerappEnv \
--enable-java-metrics
创建启用了 java 代理的容器应用
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-app:v1.0 --environment MyContainerappEnv \
--enable-java-agent
在容器应用上创建 Azure Functions (kind=functionapp)
az containerapp create -n my-containerapp -g MyResourceGroup \
--image my-app:v1.0 --environment MyContainerappEnv \
--kind functionapp
必需参数
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
允许入口流量的不安全连接。
| 属性 | 值 |
|---|---|
| 默认值: | False |
| 接受的值: | false, true |
容器启动命令参数的列表。 空格分隔的值,例如“-c”“mycommand”。 用于清除现有值的空字符串。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
用于生成容器映像的应用程序项目的本地路径。 请参阅此处支持的项目: https://aka.ms/SourceToCloudSupportedArtifacts
要连接到此应用的服务、绑定或 Java 组件的空间分隔列表。 例如,SVC_NAME1[:BIND_NAME1] SVC_NAME2[:BIND_NAME2]...
| 属性 | 值 |
|---|---|
| 参数组: | Service Binding Arguments |
提供的 GitHub 存储库中的分支。 假定为 GitHub 存储库的默认分支(如果未指定)。
| 属性 | 值 |
|---|---|
| 参数组: | GitHub Repository Arguments |
生成的环境变量列表。 以“key=value”格式分隔的空间值。
将在启动期间执行的容器上支持的命令列表。 空格分隔的值,例如“/bin/queue”“mycommand”。 用于清除现有值的空字符串。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
用于运行 docker 生成的存储库中的路径。 默认值为“./”。 假定 Dockerfile 名为“Dockerfile”,在此目录中。
| 属性 | 值 |
|---|---|
| 参数组: | GitHub Repository Arguments |
核心中所需的 CPU(从 0.25 到 2.0),例如 0.5。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
用于更改默认配置名称的自定义密钥。 键是原始名称,值为自定义名称。
| 属性 | 值 |
|---|---|
| 参数组: | Service Binding Arguments |
为 Dapr sidecar 启用 API 日志记录。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
| 默认值: | False |
Dapr 应用程序标识符。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
Dapr 端口用于与应用程序通信。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
Dapr 用于与应用程序通信的协议。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
| 接受的值: | grpc, http |
增加请求正文 http 和 grpc 服务器参数的最大大小(以 MB 为单位)以处理大文件的上传。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
发送多 KB 标头时要处理的 http 标头读取缓冲区的最大大小(以 KB 为单位)。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
设置 Dapr sidecar 的日志级别。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
| 接受的值: | debug, error, info, warn |
指示 Dapr 侧车是否已启用的布尔值。
| 属性 | 值 |
|---|---|
| 参数组: | Dapr Arguments |
| 默认值: | False |
| 接受的值: | false, true |
指示是否为应用启用 Java 代理的布尔值。 仅适用于 Java 运行时。
| 属性 | 值 |
|---|---|
| 参数组: | Runtime Arguments |
| 接受的值: | false, true |
指示是否为应用启用 Java 指标的布尔值。 仅适用于 Java 运行时。
| 属性 | 值 |
|---|---|
| 参数组: | Runtime Arguments |
| 接受的值: | false, true |
容器的环境变量列表。 以“key=value”格式分隔的空间值。 用于清除现有值的空字符串。 前缀值为“secretref:”以引用机密。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器应用环境的名称或资源 ID。
环境类型。
| 属性 | 值 |
|---|---|
| 默认值: | managed |
| 接受的值: | connected, managed |
其他公开端口。 仅受 tcp 传输协议支持。 如果应用入口为外部,则每个环境必须是唯一的。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
容器映像,例如 publisher/image-name:tag。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
入口类型。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
| 接受的值: | external, internal |
设置为“functionapp”,为容器应用上的 Azure Functions 启用内置支持和自动缩放。
| 属性 | 值 |
|---|---|
| 接受的值: | functionapp |
容器应用可以拥有的最大非活动修订。
最大副本数。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
0.5 - 4.0 的必需内存以“Gi”结尾,例如 1.0Gi。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
副本的最小数目。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
要向Azure 容器注册表(而不是用户名/密码)进行身份验证的托管标识。 对系统定义的标识使用“system”,对环境级别系统定义标识使用“system-environment”,或者为用户定义的环境/containerapp 级别标识使用资源 ID。 在部署之前,应为托管标识分配 ACR 的 acrpull 权限(使用“az role assignment create --role acrpull ...”)。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
登录到容器注册表的密码。 如果存储为机密,则值必须以“secretref:”开头,后跟机密名称。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
容器注册表服务器主机名,例如 myregistry.azurecr.io。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
要登录到容器注册表的用户名。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
以以下格式通过 GitHub Actions 创建应用:https://github.com/owner/repository-name 或所有者/存储库名称。
| 属性 | 值 |
|---|---|
| 参数组: | GitHub Repository Arguments |
追加到修订名称的用户友好后缀。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器应用的活动修订模式。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
| 默认值: | single |
| 接受的值: | labels, multiple, single |
容器应用的运行时。
| 属性 | 值 |
|---|---|
| 参数组: | Runtime Arguments |
| 接受的值: | generic, java |
缩放规则身份验证参数。 身份验证参数的格式必须为“{triggerParameter}={secretRef} {triggerParameter}={secretRef} ...”。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
横向扩展前的最大并发请求数。仅支持 http 和 tcp 缩放规则。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
使用 Azure 缩放程序资源(存储帐户/事件中心或其他)或系统进行身份验证的托管标识的资源 ID,或者使用系统分配的标识。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则元数据。 元数据的格式必须为“{key}={value} {key}={value} ...”。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则的类型。 默认值:http。 有关详细信息,请访问 https://learn.microsoft.com/azure/container-apps/scale-app#scale-triggers。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
装载所有机密的路径,例如 mnt/secrets。
容器应用的机密列表。 以“key=value”格式分隔的空间值。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
服务主体客户端 ID。 由 GitHub Actions 用来向 Azure 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | GitHub Repository Arguments |
服务主体客户端机密。 由 GitHub Actions 用来向 Azure 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | GitHub Repository Arguments |
服务主体租户 ID。 由 GitHub Actions 用来向 Azure 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | GitHub Repository Arguments |
包含用于生成容器映像的应用程序源和 Dockerfile 的本地目录路径。 预览:如果没有 Dockerfile,则使用 buildpack 生成容器映像。 如果 Docker 未运行或生成包无法使用,Oryx 将用于生成映像。 请参阅此处支持的 Oryx 运行时: https://aka.ms/SourceToCloudSupportedVersions。
指示是否分配系统分配标识的布尔值。
| 属性 | 值 |
|---|---|
| 参数组: | Identity Arguments |
| 默认值: | False |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
要应用于新修订的标签。 修订模式“标签”是必需的。
用于入口流量的应用程序端口。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
副本在强制终止前正常关闭副本的持续时间(以秒为单位)。 (默认值:30)。
具有对指定存储库的写入访问权限的个人访问令牌。 有关详细信息,请参阅 https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line。 如果未在缓存中提供或未找到 (并使用 --repo),则会打开浏览器页面,以便通过 Github 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | GitHub Repository Arguments |
用于入口流量的传输协议。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
| 默认值: | auto |
| 接受的值: | auto, http, http2, tcp |
要分配的空间分隔用户标识。
| 属性 | 值 |
|---|---|
| 参数组: | Identity Arguments |
要在其中运行应用的工作负荷配置文件的名称。
具有容器应用的配置的 .yaml 文件的路径。 将忽略所有其他参数。 有关示例,请参阅 https://learn.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp debug
此命令处于预览阶段,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
在容器应用调试控制台中打开类似于 SSH 的交互式 shell,或在容器内执行命令并退出。
az containerapp debug --name
--resource-group
[--command]
[--container]
[--replica]
[--revision]
示例
通过按副本、修订和容器连接到容器应用的调试控制台进行调试
az containerapp debug -n MyContainerapp -g MyResourceGroup --revision MyRevision --replica MyReplica --container MyContainer
通过在容器应用内执行命令并退出来调试
az containerapp debug -n MyContainerapp -g MyResourceGroup --revision MyRevision --replica MyReplica --container MyContainer --command "echo Hello World"
必需参数
Containerapp 的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
在调试容器中运行并退出的命令。 如果指定,则运行命令,会话结束。 如果未指定,则会启动交互式 bash shell。
调试控制台将连接到的容器名称。 默认为第一个副本的第一个容器。
副本的名称。 使用“az containerapp replica list”列出副本。 如果应用没有流量,则副本可能无法将其缩放为零。 默认为“az containerapp replica list”的第一个副本。
容器应用修订版的名称。 默认为最新修订。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp delete
删除容器应用。
az containerapp delete [--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
[--yes]
示例
删除容器应用。
az containerapp delete -g MyResourceGroup -n MyContainerapp
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp delete (containerapp 扩展)
删除容器应用。
az containerapp delete [--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
[--yes]
示例
删除容器应用。
az containerapp delete -g MyResourceGroup -n MyContainerapp
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp exec
在容器应用副本中打开类似于 SSH 的交互式 shell。
az containerapp exec --name
--resource-group
[--command]
[--container]
[--replica]
[--revision]
示例
exec 进入容器应用
az containerapp exec -n my-containerapp -g MyResourceGroup
执行到特定的容器应用副本和修订
az containerapp exec -n my-containerapp -g MyResourceGroup --replica MyReplica --revision MyRevision
在 containerapp 中打开 bash shell
az containerapp exec -n my-containerapp -g MyResourceGroup --command bash
必需参数
Containerapp 的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
启动命令(bash、zsh、sh 等)。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
| 默认值: | sh |
要通过 SSH 连接到的容器的名称。
要通过 SSH 连接到的副本的名称。 使用“az containerapp replica list”列出副本。 如果应用没有流量,则副本可能不存在。
要通过 ssh 连接到的容器应用修订版的名称。 默认为最新修订。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp list
列出容器应用。
az containerapp list [--environment]
[--resource-group]
示例
列出当前订阅中的容器应用。
az containerapp list
按资源组列出容器应用。
az containerapp list -g MyResourceGroup
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
容器应用环境的名称或资源 ID。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp list (containerapp 扩展)
列出容器应用。
az containerapp list [--environment]
[--environment-type {connected, managed}]
[--resource-group]
示例
列出当前订阅中的容器应用。
az containerapp list
按资源组列出容器应用。
az containerapp list -g MyResourceGroup
按环境类型列出容器应用。
az containerapp list --environment-type connected
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
容器应用环境的名称或资源 ID。
环境类型。
| 属性 | 值 |
|---|---|
| 默认值: | all |
| 接受的值: | connected, managed |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp list-usages
列出特定区域中订阅级别配额的使用情况。
az containerapp list-usages --location
示例
列出特定区域中配额的使用情况。
az containerapp list-usages -l eastus
必需参数
Location.
az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp show
显示容器应用的详细信息。
az containerapp show [--ids]
[--name]
[--resource-group]
[--show-secrets]
[--subscription]
示例
显示容器应用的详细信息。
az containerapp show -n my-containerapp -g MyResourceGroup
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
显示 Containerapp 机密。
| 属性 | 值 |
|---|---|
| 默认值: | False |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp show (containerapp 扩展)
显示容器应用的详细信息。
az containerapp show [--ids]
[--name]
[--resource-group]
[--show-secrets]
[--subscription]
示例
显示容器应用的详细信息。
az containerapp show -n my-containerapp -g MyResourceGroup
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
显示 Containerapp 机密。
| 属性 | 值 |
|---|---|
| 默认值: | False |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp show-custom-domain-verification-id
显示绑定应用或环境自定义域的验证 ID。
az containerapp show-custom-domain-verification-id
示例
获取验证 ID,需要将其添加为应用自定义域的 TXT 记录来验证域所有权
az containerapp show-custom-domain-verification-id
获取验证 ID,需要将其添加为自定义环境 DNS 后缀的 TXT 记录来验证域所有权
az containerapp show-custom-domain-verification-id
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp up
创建或更新容器应用以及任何关联的资源(ACR、资源组、容器应用环境、GitHub Actions 等)。
az containerapp up --name
[--branch]
[--browse]
[--context-path]
[--env-vars]
[--environment]
[--image]
[--ingress {external, internal}]
[--location]
[--logs-workspace-id]
[--logs-workspace-key]
[--registry-password]
[--registry-server]
[--registry-username]
[--repo]
[--resource-group]
[--service-principal-client-id --sp-cid]
[--service-principal-client-secret --sp-sec]
[--service-principal-tenant-id --sp-tid]
[--source]
[--target-port]
[--token]
[--workload-profile-name]
示例
从 GitHub 存储库中的 dockerfile 创建容器应用(设置 github 操作)
az containerapp up -n my-containerapp --repo https://github.com/myAccount/myRepo
从本地目录中的 dockerfile 创建容器应用(如果未找到 dockerfile,则自动生成容器)
az containerapp up -n my-containerapp --source .
从注册表中的映像创建容器应用
az containerapp up -n my-containerapp --image myregistry.azurecr.io/myImage:myTag
从注册表中启用了入口的映像和指定的环境创建容器应用
az containerapp up -n my-containerapp --image myregistry.azurecr.io/myImage:myTag --ingress external --target-port 80 --environment MyEnv
必需参数
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
Github 存储库的分支。 假定为 Github 存储库的默认分支(如果未指定)。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
在创建和部署后,在 Web 浏览器中打开应用(如果可能)。
| 属性 | 值 |
|---|---|
| 默认值: | False |
从中运行 docker 生成的存储库中的路径。 默认值为“./”。 假定 Dockerfile 名为“Dockerfile”,在此目录中。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
容器的环境变量列表。 以“key=value”格式分隔的空间值。 用于清除现有值的空字符串。 前缀值为“secretref:”以引用机密。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器应用环境的名称或资源 ID。
容器映像,例如 publisher/image-name:tag。
入口类型。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
| 接受的值: | external, internal |
Location.
az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。
要向其发送诊断日志的 Log Analytics 工作区的工作区 ID。 可以使用“az monitor log-analytics workspace create”创建一个。 可能会应用额外的计费。
| 属性 | 值 |
|---|---|
| 参数组: | Log Analytics (Environment) Arguments |
用于配置 Log Analytics 工作区的 Log Analytics 工作区密钥。 可以使用“az monitor log-analytics workspace get-shared-keys”检索密钥。
| 属性 | 值 |
|---|---|
| 参数组: | Log Analytics (Environment) Arguments |
登录到容器注册表的密码。 如果存储为机密,则值必须以“secretref:”开头,后跟机密名称。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
容器注册表服务器主机名,例如 myregistry.azurecr.io。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
要登录到容器注册表的用户名。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
通过 Github Actions 创建应用。 采用以下格式:https://github.com/<owner>/<repository-name> 或 <owner>/<repository-name>。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
服务主体客户端 ID。 由 Github Actions 用来向 Azure 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
服务主体客户端机密。 由 Github Actions 用来向 Azure 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
服务主体租户 ID。 由 Github Actions 用来向 Azure 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
包含用于生成容器映像的应用程序源和 Dockerfile 的本地目录路径。 预览:如果没有 Dockerfile,则使用 buildpack 生成容器映像。 如果 Docker 未运行或生成包无法使用,Oryx 将用于生成映像。 请参阅此处支持的 Oryx 运行时: https://github.com/microsoft/Oryx/blob/main/doc/supportedRuntimeVersions.md。
用于入口流量的应用程序端口。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
具有对指定存储库的写入访问权限的个人访问令牌。 有关详细信息,请参阅 https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line。 如果未在缓存中提供或未找到 (并使用 --repo),则会打开浏览器页面,以便通过 Github 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
工作负荷配置文件的友好名称。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp up (containerapp 扩展)
创建或更新容器应用以及任何关联的资源(ACR、资源组、容器应用环境、GitHub Actions 等)。
az containerapp up --name
[--artifact]
[--branch]
[--browse]
[--build-env-vars]
[--connected-cluster-id]
[--context-path]
[--custom-location]
[--env-vars]
[--environment]
[--image]
[--ingress {external, internal}]
[--kind {functionapp}]
[--location]
[--logs-workspace-id]
[--logs-workspace-key]
[--model-name]
[--model-registry]
[--model-version]
[--registry-identity]
[--registry-password]
[--registry-server]
[--registry-username]
[--repo]
[--resource-group]
[--revisions-mode {labels, multiple, single}]
[--service-principal-client-id --sp-cid]
[--service-principal-client-secret --sp-sec]
[--service-principal-tenant-id --sp-tid]
[--source]
[--system-assigned]
[--target-label]
[--target-port]
[--token]
[--user-assigned]
[--workload-profile-name]
示例
从 GitHub 存储库中的 dockerfile 创建容器应用(设置 github 操作)
az containerapp up -n my-containerapp --repo https://github.com/myAccount/myRepo
从本地目录中的 dockerfile 创建容器应用(如果未找到 dockerfile,则自动生成容器)
az containerapp up -n my-containerapp --source .
从注册表中的映像创建容器应用
az containerapp up -n my-containerapp --image myregistry.azurecr.io/myImage:myTag
从注册表中启用了入口的映像和指定的环境创建容器应用
az containerapp up -n my-containerapp --image myregistry.azurecr.io/myImage:myTag --ingress external --target-port 80 --environment MyEnv
从连接的群集上的注册表中的映像创建容器应用
az containerapp up -n my-containerapp --image myregistry.azurecr.io/myImage:myTag --connected-cluster-id MyConnectedClusterResourceId
从连接的环境中的注册表中的映像创建容器应用
az containerapp up -n my-containerapp --image myregistry.azurecr.io/myImage:myTag --environment MyConnectedEnvironmentId
创建容器应用并从 Azure AI Foundry 部署模型
az containerapp up -n my-containerapp -l westus3 --model-registry azureml --model-name Phi-4 --model-version 7
在容器应用上创建 Azure Functions (kind=functionapp)
az containerapp up -n my-containerapp --image my-app:v1.0 --kind functionapp
必需参数
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
用于生成容器映像的应用程序项目的本地路径。 请参阅此处支持的项目: https://aka.ms/SourceToCloudSupportedArtifacts
Github 存储库的分支。 假定为 Github 存储库的默认分支(如果未指定)。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
在创建和部署后,在 Web 浏览器中打开应用(如果可能)。
| 属性 | 值 |
|---|---|
| 默认值: | False |
生成的环境变量列表。 以“key=value”格式分隔的空间值。
已连接的群集的资源 ID。 使用“az connectedk8s list”列出。
从中运行 docker 生成的存储库中的路径。 默认值为“./”。 假定 Dockerfile 名为“Dockerfile”,在此目录中。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
自定义位置的资源 ID。 使用“az customlocation list”列出。
容器的环境变量列表。 以“key=value”格式分隔的空间值。 用于清除现有值的空字符串。 前缀值为“secretref:”以引用机密。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器应用的托管环境或连接环境的名称或资源 ID。
容器映像,例如 publisher/image-name:tag。
入口类型。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
| 接受的值: | external, internal |
设置为“functionapp”,为容器应用上的 Azure Functions 启用内置支持和自动缩放。
| 属性 | 值 |
|---|---|
| 接受的值: | functionapp |
Location.
az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。
要向其发送诊断日志的 Log Analytics 工作区的工作区 ID。 可以使用“az monitor log-analytics workspace create”创建一个。 可能会应用额外的计费。
| 属性 | 值 |
|---|---|
| 参数组: | Log Analytics (Environment) Arguments |
用于配置 Log Analytics 工作区的 Log Analytics 工作区密钥。 可以使用“az monitor log-analytics workspace get-shared-keys”检索密钥。
| 属性 | 值 |
|---|---|
| 参数组: | Log Analytics (Environment) Arguments |
Azure AI Foundry 模型的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Deploy an Azure AI Foundry Model Arguments |
Azure AI Foundry 模型注册表的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Deploy an Azure AI Foundry Model Arguments |
Azure AI Foundry 模型的版本。
| 属性 | 值 |
|---|---|
| 参数组: | Deploy an Azure AI Foundry Model Arguments |
使用注册表服务器进行身份验证的托管标识,而不是用户名/密码。 分别将资源 ID 或“系统”用于用户定义的标识和系统定义标识。 注册表必须是 ACR。 如果可能,将自动为标识创建“acrpull”角色分配。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
登录到容器注册表的密码。 如果存储为机密,则值必须以“secretref:”开头,后跟机密名称。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
容器注册表服务器主机名,例如 myregistry.azurecr.io。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
要登录到容器注册表的用户名。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
通过 Github Actions 创建应用。 采用以下格式:https://github.com/owner/repository-name 或所有者/存储库名称。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
容器应用的活动修订模式。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
| 接受的值: | labels, multiple, single |
服务主体客户端 ID。 由 Github Actions 用来向 Azure 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
服务主体客户端机密。 由 Github Actions 用来向 Azure 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
服务主体租户 ID。 由 Github Actions 用来向 Azure 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
包含用于生成容器映像的应用程序源和 Dockerfile 的本地目录路径。 预览:如果没有 Dockerfile,则使用 buildpack 生成容器映像。 如果 Docker 未运行或生成包无法使用,Oryx 将用于生成映像。 请参阅此处支持的 Oryx 运行时: https://github.com/microsoft/Oryx/blob/main/doc/supportedRuntimeVersions.md。
指示是否分配系统分配标识的布尔值。
| 属性 | 值 |
|---|---|
| 参数组: | Identity Arguments |
要应用于新修订的标签。 修订模式“标签”是必需的。
用于入口流量的应用程序端口。
| 属性 | 值 |
|---|---|
| 参数组: | Ingress Arguments |
具有对指定存储库的写入访问权限的个人访问令牌。 有关详细信息,请参阅 https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line。 如果未在缓存中提供或未找到 (并使用 --repo),则会打开浏览器页面,以便通过 Github 进行身份验证。
| 属性 | 值 |
|---|---|
| 参数组: | Github Repo Arguments |
要分配的空间分隔用户标识。
| 属性 | 值 |
|---|---|
| 参数组: | Identity Arguments |
工作负荷配置文件的友好名称。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp update
更新容器应用。 在多个修订模式下,基于最新修订创建新的修订。
az containerapp update [--args]
[--command]
[--container-name]
[--cpu]
[--ids]
[--image]
[--max-replicas]
[--memory]
[--min-replicas]
[--name]
[--no-wait]
[--remove-all-env-vars]
[--remove-env-vars]
[--replace-env-vars]
[--resource-group]
[--revision-suffix]
[--scale-rule-auth --sra]
[--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc]
[--scale-rule-metadata --srm]
[--scale-rule-name --srn]
[--scale-rule-type --srt]
[--secret-volume-mount]
[--set-env-vars]
[--subscription]
[--tags]
[--termination-grace-period --tgp]
[--workload-profile-name]
[--yaml]
示例
更新容器应用的容器映像。
az containerapp update -n my-containerapp -g MyResourceGroup \
--image myregistry.azurecr.io/my-app:v2.0
更新容器应用的资源要求和缩放限制。
az containerapp update -n my-containerapp -g MyResourceGroup \
--cpu 0.5 --memory 1.0Gi \
--min-replicas 4 --max-replicas 8
使用 http 缩放规则更新容器应用
az containerapp update -n myapp -g mygroup \
--scale-rule-name my-http-rule \
--scale-rule-http-concurrency 50
使用自定义缩放规则更新容器应用
az containerapp update -n myapp -g mygroup \
--scale-rule-name my-custom-rule \
--scale-rule-type my-custom-type \
--scale-rule-metadata key=value key2=value2 \
--scale-rule-auth triggerparam=secretref triggerparam=secretref
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
容器启动命令参数的列表。 空格分隔的值,例如“-c”“mycommand”。 用于清除现有值的空字符串。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
将在启动期间执行的容器上支持的命令列表。 空格分隔的值,例如“/bin/queue”“mycommand”。 用于清除现有值的空字符串。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
核心中所需的 CPU(从 0.25 到 2.0),例如 0.5。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
容器映像,例如 publisher/image-name:tag。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
最大副本数。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
0.5 - 4.0 的必需内存以“Gi”结尾,例如 1.0Gi。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
副本的最小数目。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
从 container 中删除所有环境变量。。
| 属性 | 值 |
|---|---|
| 参数组: | Environment variables Arguments |
| 默认值: | False |
从容器中删除环境变量。 空格分隔的环境变量名称。
| 属性 | 值 |
|---|---|
| 参数组: | Environment variables Arguments |
替换容器中的环境变量。 将删除其他现有环境变量。 以“key=value”格式分隔的空间值。 如果存储为机密,则值必须以“secretref:”开头,后跟机密名称。
| 属性 | 值 |
|---|---|
| 参数组: | Environment variables Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
追加到修订名称的用户友好后缀。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
缩放规则身份验证参数。 身份验证参数的格式必须为“{triggerParameter}={secretRef} {triggerParameter}={secretRef} ...”。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
横向扩展前的最大并发请求数。仅支持 http 和 tcp 缩放规则。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则元数据。 元数据的格式必须为“{key}={value} {key}={value} ...”。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则的类型。 默认值:http。 有关详细信息,请访问 https://learn.microsoft.com/azure/container-apps/scale-app#scale-triggers。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
装载所有机密的路径,例如 mnt/secrets。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
在容器中添加或更新环境变量。 不会修改现有环境变量。 以“key=value”格式分隔的空间值。 如果存储为机密,则值必须以“secretref:”开头,后跟机密名称。
| 属性 | 值 |
|---|---|
| 参数组: | Environment variables Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
副本在强制终止前正常关闭副本的持续时间(以秒为单位)。 (默认值:30)。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
工作负荷配置文件的友好名称。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
具有容器应用的配置的 .yaml 文件的路径。 将忽略所有其他参数。 有关示例,请参阅 https://learn.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az containerapp update (containerapp 扩展)
更新容器应用。 在多个修订模式下,基于最新修订创建新的修订。
az containerapp update [--args]
[--artifact]
[--bind]
[--build-env-vars]
[--command]
[--container-name]
[--cpu]
[--customized-keys]
[--enable-java-agent {false, true}]
[--enable-java-metrics {false, true}]
[--ids]
[--image]
[--max-inactive-revisions]
[--max-replicas]
[--memory]
[--min-replicas]
[--name]
[--no-wait]
[--remove-all-env-vars]
[--remove-env-vars]
[--replace-env-vars]
[--resource-group]
[--revision-suffix]
[--revisions-mode {labels, multiple, single}]
[--runtime {generic, java}]
[--scale-rule-auth --sra]
[--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc]
[--scale-rule-identity --sri]
[--scale-rule-metadata --srm]
[--scale-rule-name --srn]
[--scale-rule-type --srt]
[--secret-volume-mount]
[--set-env-vars]
[--source]
[--subscription]
[--tags]
[--target-label]
[--termination-grace-period --tgp]
[--unbind]
[--workload-profile-name]
[--yaml]
示例
更新容器应用的容器映像。
az containerapp update -n my-containerapp -g MyResourceGroup \
--image myregistry.azurecr.io/my-app:v2.0
更新容器应用的资源要求和缩放限制。
az containerapp update -n my-containerapp -g MyResourceGroup \
--cpu 0.5 --memory 1.0Gi \
--min-replicas 4 --max-replicas 8
使用 http 缩放规则更新容器应用
az containerapp update -n myapp -g mygroup \
--scale-rule-name my-http-rule \
--scale-rule-http-concurrency 50
使用自定义缩放规则更新容器应用
az containerapp update -n myapp -g mygroup \
--scale-rule-name my-custom-rule \
--scale-rule-type my-custom-type \
--scale-rule-metadata key=value key2=value2 \
--scale-rule-auth triggerparam=secretref triggerparam=secretref
从提供的应用程序源更新容器应用
az containerapp update -n my-containerapp -g MyResourceGroup --source .
使用已启用 java 指标更新容器应用
az containerapp update -n my-containerapp -g MyResourceGroup \
--enable-java-metrics
使用启用 java 代理更新容器应用
az containerapp update -n my-containerapp -g MyResourceGroup \
--enable-java-agent
更新容器应用以擦除 java 增强功能,例如 java 指标、java 代理等。
az containerapp update -n my-containerapp -g MyResourceGroup \
--runtime generic
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
容器启动命令参数的列表。 空格分隔的值,例如“-c”“mycommand”。 用于清除现有值的空字符串。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
用于生成容器映像的应用程序项目的本地路径。 请参阅此处支持的项目: https://aka.ms/SourceToCloudSupportedArtifacts
要连接到此应用的服务、绑定或 Java 组件的空间分隔列表。 例如,SVC_NAME1[:BIND_NAME1] SVC_NAME2[:BIND_NAME2]...
| 属性 | 值 |
|---|---|
| 参数组: | Service Binding Arguments |
生成的环境变量列表。 以“key=value”格式分隔的空间值。
将在启动期间执行的容器上支持的命令列表。 空格分隔的值,例如“/bin/queue”“mycommand”。 用于清除现有值的空字符串。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
核心中所需的 CPU(从 0.25 到 2.0),例如 0.5。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
用于更改默认配置名称的自定义密钥。 键是原始名称,值为自定义名称。
| 属性 | 值 |
|---|---|
| 参数组: | Service Binding Arguments |
指示是否为应用启用 Java 代理的布尔值。 仅适用于 Java 运行时。
| 属性 | 值 |
|---|---|
| 参数组: | Runtime Arguments |
| 接受的值: | false, true |
指示是否为应用启用 Java 指标的布尔值。 仅适用于 Java 运行时。
| 属性 | 值 |
|---|---|
| 参数组: | Runtime Arguments |
| 接受的值: | false, true |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
容器映像,例如 publisher/image-name:tag。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器应用可以拥有的最大非活动修订。
最大副本数。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
0.5 - 4.0 的必需内存以“Gi”结尾,例如 1.0Gi。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
副本的最小数目。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
Containerapp 的名称。 名称必须包含小写字母数字字符或“-”,以字母开头,以字母数字字符结尾,不能有“--”,并且必须小于 32 个字符。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
从 container 中删除所有环境变量。。
| 属性 | 值 |
|---|---|
| 参数组: | Environment variables Arguments |
| 默认值: | False |
从容器中删除环境变量。 空格分隔的环境变量名称。
| 属性 | 值 |
|---|---|
| 参数组: | Environment variables Arguments |
替换容器中的环境变量。 将删除其他现有环境变量。 以“key=value”格式分隔的空间值。 如果存储为机密,则值必须以“secretref:”开头,后跟机密名称。
| 属性 | 值 |
|---|---|
| 参数组: | Environment variables Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
追加到修订名称的用户友好后缀。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
容器应用的活动修订模式。
| 属性 | 值 |
|---|---|
| 参数组: | Configuration Arguments |
| 接受的值: | labels, multiple, single |
容器应用的运行时。
| 属性 | 值 |
|---|---|
| 参数组: | Runtime Arguments |
| 接受的值: | generic, java |
缩放规则身份验证参数。 身份验证参数的格式必须为“{triggerParameter}={secretRef} {triggerParameter}={secretRef} ...”。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
横向扩展前的最大并发请求数。仅支持 http 和 tcp 缩放规则。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
使用 Azure 缩放程序资源(存储帐户/事件中心或其他)或系统进行身份验证的托管标识的资源 ID,或者使用系统分配的标识。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则元数据。 元数据的格式必须为“{key}={value} {key}={value} ...”。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
缩放规则的类型。 默认值:http。 有关详细信息,请访问 https://learn.microsoft.com/azure/container-apps/scale-app#scale-triggers。
| 属性 | 值 |
|---|---|
| 参数组: | Scale Arguments |
装载所有机密的路径,例如 mnt/secrets。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
在容器中添加或更新环境变量。 不会修改现有环境变量。 以“key=value”格式分隔的空间值。 如果存储为机密,则值必须以“secretref:”开头,后跟机密名称。
| 属性 | 值 |
|---|---|
| 参数组: | Environment variables Arguments |
包含用于生成容器映像的应用程序源和 Dockerfile 的本地目录路径。 预览:如果没有 Dockerfile,则使用 buildpack 生成容器映像。 如果 Docker 未运行或生成包无法使用,Oryx 将用于生成映像。 请参阅此处支持的 Oryx 运行时: https://aka.ms/SourceToCloudSupportedVersions。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
要应用于新修订的标签。 修订模式“标签”是必需的。
副本在强制终止前正常关闭副本的持续时间(以秒为单位)。 (默认值:30)。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
要从此应用中删除的服务、绑定或 Java 组件的空间分隔列表。 例如BIND_NAME1...
| 属性 | 值 |
|---|---|
| 参数组: | Service Binding Arguments |
工作负荷配置文件的友好名称。
| 属性 | 值 |
|---|---|
| 参数组: | Container Arguments |
具有容器应用的配置的 .yaml 文件的路径。 将忽略所有其他参数。 有关示例,请参阅 https://learn.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |