Queues - Add

创建新的代理队列,将项目连接到代理池。

POST https://dev.azure.com/{organization}/{project}/_apis/distributedtask/queues?api-version=7.1
POST https://dev.azure.com/{organization}/{project}/_apis/distributedtask/queues?authorizePipelines={authorizePipelines}&api-version=7.1

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

project
path

string

项目 ID 或项目名称

api-version
query True

string

要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。

authorizePipelines
query

boolean

使用 YAML 时自动授权此队列

请求正文

名称 类型 说明
id

integer (int32)

队列的 ID

name

string

队列的名称

pool

TaskAgentPoolReference

此队列的池参考

projectId

string (uuid)

项目 ID

响应

名称 类型 说明
200 OK

TaskAgentQueue

成功作

安全性

oauth2

类型: oauth2
流向: accessCode
授权 URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
令牌 URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

作用域

名称 说明
vso.agentpools_manage 授予管理池、队列和代理的能力

定义

名称 说明
TaskAgentPoolOptions

其他池设置和详细信息

TaskAgentPoolReference
TaskAgentPoolType

获取或设置池的类型

TaskAgentQueue

代理队列。

TaskAgentPoolOptions

其他池设置和详细信息

说明
elasticPool

由弹性池服务支持的 TaskAgentPool

none
preserveAgentOnJobFailure

如果在 TaskAgentJobRequest 失败后保留代理进行调查,则设置为 true

singleUseAgents

如果代理在每个 TaskAgentJobRequest 之后重新映像,则设置为 true

TaskAgentPoolReference

名称 类型 说明
id

integer (int32)

isHosted

boolean

获取或设置一个值,该值指示此池是否由服务管理。

isLegacy

boolean

确定池是否为旧池。

name

string

options

TaskAgentPoolOptions

其他池设置和详细信息

poolType

TaskAgentPoolType

获取或设置池的类型

scope

string (uuid)

size

integer (int32)

获取池的当前大小。

TaskAgentPoolType

获取或设置池的类型

说明
automation

任务代理的典型池

deployment

部署池

TaskAgentQueue

代理队列。

名称 类型 说明
id

integer (int32)

队列的 ID

name

string

队列的名称

pool

TaskAgentPoolReference

此队列的池参考

projectId

string (uuid)

项目 ID