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

az pipelines agent

Note

This reference is part of the azure-devops extension for the Azure CLI (version 2.30.0 or higher). 该扩展会在首次运行 az pipelines agent 命令时自动安装。 Learn more about extensions.

Manage agents.

命令

名称 说明 类型 Status
az pipelines agent list

获取池中的代理列表。

Extension GA
az pipelines agent show

显示代理详细信息。

Extension GA

az pipelines agent list

获取池中的代理列表。

az pipelines agent list --pool-id
                        [--agent-name]
                        [--demands]
                        [--detect {false, true}]
                        [--include-assigned-request {false, true}]
                        [--include-capabilities {false, true}]
                        [--include-last-completed-request {false, true}]
                        [--org --organization]

必需参数

--pool-id

包含代理的代理池。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--agent-name

筛选代理名称。

--demands

按要求筛选代理可以满足的要求。 以逗号分隔的列表。

--detect

自动检测组织。

属性
接受的值: false, true
--include-assigned-request

是否包含有关代理当前工作的详细信息。

属性
接受的值: false, true
--include-capabilities

是否在响应中包含代理的功能。

属性
接受的值: false, true
--include-last-completed-request

是否包含有关代理最近完成工作的详细信息。

属性
接受的值: false, true
--org --organization

Azure DevOps 组织 URL。 可以使用 az devops configure -d organization=ORG_URL 配置默认组织。 如果未配置为默认或通过 git 配置选取,则为必需。示例:https://dev.azure.com/MyOrganizationName/

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az pipelines agent show

显示代理详细信息。

az pipelines agent show --agent-id --id
                        --pool-id
                        [--detect {false, true}]
                        [--include-assigned-request {false, true}]
                        [--include-capabilities {false, true}]
                        [--include-last-completed-request {false, true}]
                        [--org --organization]

必需参数

--agent-id --id

要获取相关信息的代理 ID。

--pool-id

包含代理的代理池。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--detect

自动检测组织。

属性
接受的值: false, true
--include-assigned-request

是否包含有关代理当前工作的详细信息。

属性
接受的值: false, true
--include-capabilities

是否在响应中包含代理的功能。

属性
接受的值: false, true
--include-last-completed-request

是否包含有关代理最近完成工作的详细信息。

属性
接受的值: false, true
--org --organization

Azure DevOps 组织 URL。 可以使用 az devops configure -d organization=ORG_URL 配置默认组织。 如果未配置为默认或通过 git 配置选取,则为必需。示例:https://dev.azure.com/MyOrganizationName/

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False