az container
Note
此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 Learn more about extensions.
管理Azure 容器实例。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az container app |
用于管理 Azure 容器实例应用的命令。 |
Extension | Preview |
az container app up |
使用 GitHub Actions 部署到 Azure 容器实例。 |
Extension | Preview |
az container attach |
将本地标准输出和错误流附加到容器组中的容器。 此命令在容器启动期间提供诊断信息。 容器启动后,它会将 STDOUT 和 STDERR 流式传输到本地控制台。 |
Core | GA |
az container container-group-profile |
管理 Azure 容器实例容器组配置文件。 |
Core | GA |
az container container-group-profile create |
创建容器组配置文件。 |
Core | GA |
az container container-group-profile delete |
删除容器组配置文件。 |
Core | GA |
az container container-group-profile list |
列出资源组中的所有容器组配置文件。 |
Core | GA |
az container container-group-profile list-revisions |
列出容器组配置文件的所有修订。 |
Core | GA |
az container container-group-profile show |
获取容器组配置文件。 |
Core | GA |
az container container-group-profile show-revision |
显示容器组配置文件修订。 |
Core | GA |
az container create |
创建容器组。 |
Core | GA |
az container delete |
删除容器组。 |
Core | GA |
az container exec |
从容器组的正在运行的容器内执行命令。 |
Core | GA |
az container export |
以 yaml 格式导出容器组。 |
Core | GA |
az container list |
列出容器组。 |
Core | GA |
az container logs |
检查容器组中容器的日志。 |
Core | GA |
az container restart |
重启容器组中的所有容器。 |
Core | GA |
az container show |
获取容器组的详细信息。 |
Core | GA |
az container start |
启动容器组中的所有容器。 |
Core | GA |
az container stop |
停止容器组中的所有容器。 |
Core | GA |
az container attach
将本地标准输出和错误流附加到容器组中的容器。 此命令在容器启动期间提供诊断信息。 容器启动后,它会将 STDOUT 和 STDERR 流式传输到本地控制台。
az container attach [--container-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
示例
将本地标准输出和错误流附加到容器组中的容器。 (autogenerated)
az container attach --name MyContainerGroup --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
要附加到的容器。 如果省略,则会选择容器组中的第一个容器。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
容器组的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az container create
创建容器组。
az container create --resource-group
[--acr-identity]
[--add-capabilities]
[--allow-escalation]
[--assign-identity]
[--azure-file-volume-account-key]
[--azure-file-volume-account-name]
[--azure-file-volume-mount-path]
[--azure-file-volume-share-name]
[--cce-policy]
[--command-line]
[--config-map]
[--container-group-profile-id]
[--container-group-profile-revision]
[--cpu]
[--dns-name-label]
[--drop-capabilities]
[--environment-variables]
[--fail-container-group-create-on-reuse-failure]
[--file]
[--gitrepo-dir]
[--gitrepo-mount-path]
[--gitrepo-revision]
[--gitrepo-url]
[--image]
[--ip-address {Private, Public}]
[--location]
[--log-analytics-workspace]
[--log-analytics-workspace-key]
[--memory]
[--name]
[--no-wait]
[--os-type {Linux, Windows}]
[--ports]
[--priority]
[--privileged]
[--protocol {TCP, UDP}]
[--registry-login-server]
[--registry-password]
[--registry-username]
[--restart-policy {Always, Never, OnFailure}]
[--role]
[--run-as-group]
[--run-as-user]
[--scope]
[--seccomp-profile]
[--secrets]
[--secrets-mount-path]
[--secure-environment-variables]
[--sku]
[--standby-pool-profile-id]
[--subnet]
[--subnet-address-prefix]
[--vnet]
[--vnet-address-prefix]
[--zone]
示例
在具有 1 核和 1Gb 内存的容器组中创建容器。
az container create -g MyResourceGroup --name myapp --image myimage:latest --cpu 1 --memory 1
在运行 Windows 的容器组中创建一个容器,其中包含 2 个核心和 3.5Gb 内存。
az container create -g MyResourceGroup --name mywinapp --image winappimage:latest --os-type Windows --cpu 2 --memory 3.5
在具有公共 IP 地址、端口和 DNS 名称标签的容器组中创建容器。
az container create -g MyResourceGroup --name myapp --image myimage:latest --ports 80 443 --dns-name-label contoso
在容器组中创建容器,该容器在启动时调用脚本。
az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "/bin/sh -c '/path to/myscript.sh'"
在运行命令并随后停止容器的容器组中创建容器。
az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "echo hello" --restart-policy Never
使用环境变量在容器组中创建容器。
az container create -g MyResourceGroup --name myapp --image myimage:latest --environment-variables key1=value1 key2=value2
使用 Azure 容器注册表中的容器映像在容器组中创建容器。
az container create -g MyResourceGroup --name myapp --image myAcrRegistry.azurecr.io/myimage:latest --registry-password password
在将 Azure 文件共享装载为卷的容器组中创建容器。
az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "cat /mnt/azfile/myfile" --azure-file-volume-share-name myshare --azure-file-volume-account-name mystorageaccount --azure-file-volume-account-key mystoragekey --azure-file-volume-mount-path /mnt/azfile
在将 git 存储库装载为卷的容器组中创建容器。
az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "cat /mnt/gitrepo" --gitrepo-url https://github.com/user/myrepo.git --gitrepo-dir ./dir1 --gitrepo-mount-path /mnt/gitrepo
使用 yaml 文件在容器组中创建容器。
az container create -g MyResourceGroup -f containerGroup.yaml
使用 Log Analytics 从工作区名称创建容器组。
az container create -g MyResourceGroup --name myapp --log-analytics-workspace myworkspace
使用系统分配的标识创建容器组。
az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity
使用系统分配的标识创建容器组。 该组将具有有权访问存储帐户的“参与者”角色。
az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1
创建具有用户分配标识的容器组。
az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity /subscriptions/mySubscriptionId/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID
使用系统和用户分配的标识创建容器组。
az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity [system] /subscriptions/mySubscriptionId/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID
必需参数
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
有权访问容器注册表的标识。
属性 | 值 |
---|---|
Parameter group: | Image Registry Arguments |
要添加的安全上下文功能的列表。
属性 | 值 |
---|---|
Parameter group: | Confidential Container Group Arguments |
允许进程能否获得比其父进程更多的特权。
属性 | 值 |
---|---|
Parameter group: | Confidential Container Group Arguments |
默认值: | False |
分配的标识的空间分隔列表。 分配的标识是用户分配的标识(资源 ID)和/或系统分配的标识('[系统]')。 有关详细信息,请参阅示例。
属性 | 值 |
---|---|
Parameter group: | Managed Service Identity Arguments |
用于访问 Azure 文件共享的存储帐户访问密钥。
属性 | 值 |
---|---|
Parameter group: | Azure File Volume Arguments |
包含 Azure 文件共享的存储帐户的名称。
属性 | 值 |
---|---|
Parameter group: | Azure File Volume Arguments |
应装载 Azure 文件卷的容器中的路径。 不得包含冒号“:”。
属性 | 值 |
---|---|
Parameter group: | Azure File Volume Arguments |
要装载为卷的 Azure 文件共享的名称。
属性 | 值 |
---|---|
Parameter group: | Azure File Volume Arguments |
机密容器组的 CCE 策略。
属性 | 值 |
---|---|
Parameter group: | Confidential Container Group Arguments |
启动容器时要运行的命令行,例如“/bin/bash -c myscript.sh”。
容器的配置映射键值对列表。 以“key=value”格式分隔的空间值。
引用容器组配置文件 ARM 资源 ID。
属性 | 值 |
---|---|
Parameter group: | Container Group Profile Reference Arguments |
引用容器组配置文件修订。
属性 | 值 |
---|---|
Parameter group: | Container Group Profile Reference Arguments |
容器的所需 CPU 核心数,准确到一个小数位数。
具有公共 IP 的容器组的 dns 名称标签。
要删除的安全上下文功能的列表。
属性 | 值 |
---|---|
Parameter group: | Confidential Container Group Arguments |
容器的环境变量列表。 以“key=value”格式分隔的空间值。
指示在备用池重用失败时容器组创建是否失败的标志。
属性 | 值 |
---|---|
Parameter group: | Standby Pool Profile Arguments |
默认值: | False |
输入文件的路径。
git 存储库中的目标目录路径。 不得包含“..”。
属性 | 值 |
---|---|
Parameter group: | Git Repo Volume Arguments |
默认值: | . |
应装载 git 存储库卷的容器中的路径。 不得包含冒号“:”。
属性 | 值 |
---|---|
Parameter group: | Git Repo Volume Arguments |
指定修订的提交哈希。
属性 | 值 |
---|---|
Parameter group: | Git Repo Volume Arguments |
要装载为卷的 git 存储库的 URL。
属性 | 值 |
---|---|
Parameter group: | Git Repo Volume Arguments |
容器映像名称。
容器组的 IP 地址类型。
属性 | 值 |
---|---|
接受的值: | Private, Public |
Location.
az account list-locations
中的值。 可以使用 az configure --defaults location=<location>
配置默认位置。
Log Analytics 工作区名称或 ID。使用当前订阅或使用 --subscription 标志设置所需的订阅。
属性 | 值 |
---|---|
Parameter group: | Log Analytics Arguments |
Log Analytics 工作区密钥。
属性 | 值 |
---|---|
Parameter group: | Log Analytics Arguments |
容器的所需内存(以 GB 为单位,精确到一个小数位)。
容器组的名称。
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
容器的 OS 类型。
属性 | 值 |
---|---|
接受的值: | Linux, Windows |
要打开的端口列表。 以空格分隔的端口列表。
属性 | 值 |
---|---|
默认值: | [80] |
容器组的优先级。
用于确定容器权限是否提升为 Privileged 的标志。
属性 | 值 |
---|---|
Parameter group: | Confidential Container Group Arguments |
默认值: | False |
要使用的网络协议。
属性 | 值 |
---|---|
接受的值: | TCP, UDP |
容器映像注册表登录服务器。
属性 | 值 |
---|---|
Parameter group: | Image Registry Arguments |
用于登录容器映像注册表服务器的密码。
属性 | 值 |
---|---|
Parameter group: | Image Registry Arguments |
要在容器映像注册表服务器中登录的用户名。
属性 | 值 |
---|---|
Parameter group: | Image Registry Arguments |
重启容器组中所有容器的策略。
属性 | 值 |
---|---|
接受的值: | Always, Never, OnFailure |
系统分配的标识将具有的角色名称或 ID。
属性 | 值 |
---|---|
Parameter group: | Managed Service Identity Arguments |
默认值: | Contributor |
设置容器的用户 UID。
属性 | 值 |
---|---|
Parameter group: | Confidential Container Group Arguments |
设置容器的用户 GID。
属性 | 值 |
---|---|
Parameter group: | Confidential Container Group Arguments |
系统分配的标识可以访问的范围。
属性 | 值 |
---|---|
Parameter group: | Managed Service Identity Arguments |
包含 seccomp 配置文件中 JSON 内容的 base64 编码字符串。
属性 | 值 |
---|---|
Parameter group: | Confidential Container Group Arguments |
以“key=value”格式分隔的空间分隔机密。
应装载机密卷的容器中的路径。 不得包含冒号“:”。
容器的安全环境变量列表。 以“key=value”格式分隔的空间值。
容器组的 SKU。
将重复使用容器的备用池配置文件 ARM 资源 ID。
属性 | 值 |
---|---|
Parameter group: | Standby Pool Profile Arguments |
创建新 VNET 或引用现有 VNET 时子网的名称。 还可以按 ID 引用现有子网。
属性 | 值 |
---|---|
Parameter group: | Network Arguments |
以 CIDR 格式创建新 VNET 时要使用的子网 IP 地址前缀。
属性 | 值 |
---|---|
Parameter group: | Network Arguments |
默认值: | 10.0.0.0/24 |
创建新 VNET 或引用现有 VNET 的名称。 还可以按 ID 引用现有 vnet。 这允许使用其他资源组中的 vnet。
属性 | 值 |
---|---|
Parameter group: | Network Arguments |
以 CIDR 格式创建新 VNET 时要使用的 IP 地址前缀。
属性 | 值 |
---|---|
Parameter group: | Network Arguments |
默认值: | 10.0.0.0/16 |
要放置容器组的区域。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az container delete
删除容器组。
az container delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
示例
删除容器组。 (autogenerated)
az container delete --name MyContainerGroup --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
容器组的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az container exec
从容器组的正在运行的容器内执行命令。
最常见的用例是打开交互式 bash shell。 请参阅以下示例。
az container exec --exec-command
[--container-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
示例
从 nginx 容器中流式传输 shell。
az container exec -g MyResourceGroup --name mynginx --container-name nginx --exec-command "/bin/bash"
必需参数
要从容器中运行的命令。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
要在其中执行命令的容器名称。 对于只有一个容器的容器组,可以忽略这些容器。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
容器组的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az container export
以 yaml 格式导出容器组。
az container export --file
[--ids]
[--name]
[--resource-group]
[--subscription]
示例
在 yaml 中导出容器组。
az container export -g MyResourceGroup --name mynginx -f output.yaml
必需参数
导出容器组的文件路径。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
容器组的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az container list
列出容器组。
az container list [--resource-group]
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az container logs
检查容器组中容器的日志。
az container logs [--container-name]
[--follow]
[--ids]
[--name]
[--resource-group]
[--subscription]
示例
检查容器组中容器的日志。 (autogenerated)
az container logs --name MyContainerGroup --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
要尾部日志的容器名称。 如果省略,则会选择容器组中的第一个容器。
指示流式传输尾部日志。
属性 | 值 |
---|---|
默认值: | False |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
容器组的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az container restart
重启容器组中的所有容器。
重启容器组中的所有容器。 如果容器映像有更新,则会下载新映像。
az container restart --name
--resource-group
[--no-wait]
必需参数
容器组的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az container show
获取容器组的详细信息。
az container show [--ids]
[--name]
[--resource-group]
[--subscription]
示例
获取容器组的详细信息。 (autogenerated)
az container show --name MyContainerGroup --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
容器组的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az container start
启动容器组中的所有容器。
启动容器组中的所有容器。 将分配计算资源,并启动计费。
az container start --name
--resource-group
[--no-wait]
必需参数
容器组的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az container stop
停止容器组中的所有容器。
停止容器组中的所有容器。 计算资源将被解除分配,计费将停止。
az container stop --name
--resource-group
必需参数
容器组的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |