Elasticpools - Create
创建新的弹性池。 这将在组织级别创建新的 TaskAgentPool。 如果提供了项目 ID,则会在指定的项目中创建新的 TaskAgentQueue。
POST https://dev.azure.com/{organization}/_apis/distributedtask/elasticpools?poolName={poolName}&api-version=7.1
POST https://dev.azure.com/{organization}/_apis/distributedtask/elasticpools?poolName={poolName}&authorizeAllPipelines={authorizeAllPipelines}&autoProvisionProjectPools={autoProvisionProjectPools}&projectId={projectId}&api-version=7.1
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
api-version
|
query | True |
string |
要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。 |
pool
|
query | True |
string |
要用于新 TaskAgentPool 的名称 |
authorize
|
query |
boolean |
用于确定默认情况下是否授权所有管道使用此 TaskAgentPool 的设置。 |
|
auto
|
query |
boolean |
设置为在新池的每个项目中自动预配 TaskAgentQueues。 |
|
project
|
query |
string (uuid) |
可选:如果提供,将在指定的项目中创建新的 TaskAgentQueue。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
agentInteractiveUI |
boolean |
设置是否应将代理配置为使用交互式 UI 运行 |
azureId |
string |
表示资源位置的 Azure 字符串 |
desiredIdle |
integer (int32) |
等待作业的代理数 |
desiredSize |
integer (int32) |
池的所需大小 |
maxCapacity |
integer (int32) |
弹性池中将存在的最大节点数 |
maxSavedNodeCount |
integer (int32) |
在发生故障时将节点保留在池中以供调查 |
offlineSince |
string (date-time) |
首次检测到池处于脱机状态的时间戳 |
orchestrationType |
池中节点的作系统类型 |
|
osType |
池中节点的作系统类型 |
|
poolId |
integer (int32) |
关联的 TaskAgentPool 的 ID |
recycleAfterEachUse |
boolean |
每个作业完成后放弃节点 |
serviceEndpointId |
string (uuid) |
用于连接到 Azure 的服务终结点的 ID |
serviceEndpointScope |
string (uuid) |
服务终结点所属的范围 |
sizingAttempts |
integer (int32) |
尝试实现所需大小时执行的大小调整尝试次数 |
state |
池的状态 |
|
timeToLiveMinutes |
integer (int32) |
使空闲代理保持活动状态的最短时间(以分钟为单位) |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功作 |
安全性
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 | 授予管理池、队列和代理的能力 |
定义
名称 | 说明 |
---|---|
Elastic |
弹性池的数据和设置 |
Elastic |
创建新弹性池返回的结果 |
Elastic |
池的状态 |
Identity |
|
Operating |
池中节点的作系统类型 |
Orchestration |
池中节点的作系统类型 |
Properties |
类将属性包表示为键值对的集合。 接受除 |
Reference |
表示 REST 引用链接集合的类。 |
Task |
代理的组织级分组。 |
Task |
其他池设置和详细信息 |
Task |
|
Task |
获取或设置池的类型 |
Task |
代理队列。 |
ElasticPool
弹性池的数据和设置
名称 | 类型 | 说明 |
---|---|---|
agentInteractiveUI |
boolean |
设置是否应将代理配置为使用交互式 UI 运行 |
azureId |
string |
表示资源位置的 Azure 字符串 |
desiredIdle |
integer (int32) |
等待作业的代理数 |
desiredSize |
integer (int32) |
池的所需大小 |
maxCapacity |
integer (int32) |
弹性池中将存在的最大节点数 |
maxSavedNodeCount |
integer (int32) |
在发生故障时将节点保留在池中以供调查 |
offlineSince |
string (date-time) |
首次检测到池处于脱机状态的时间戳 |
orchestrationType |
池中节点的作系统类型 |
|
osType |
池中节点的作系统类型 |
|
poolId |
integer (int32) |
关联的 TaskAgentPool 的 ID |
recycleAfterEachUse |
boolean |
每个作业完成后放弃节点 |
serviceEndpointId |
string (uuid) |
用于连接到 Azure 的服务终结点的 ID |
serviceEndpointScope |
string (uuid) |
服务终结点所属的范围 |
sizingAttempts |
integer (int32) |
尝试实现所需大小时执行的大小调整尝试次数 |
state |
池的状态 |
|
timeToLiveMinutes |
integer (int32) |
使空闲代理保持活动状态的最短时间(以分钟为单位) |
ElasticPoolCreationResult
创建新弹性池返回的结果
名称 | 类型 | 说明 |
---|---|---|
agentPool |
已创建的代理池 |
|
agentQueue |
创建的代理队列 |
|
elasticPool |
已创建弹性池 |
ElasticPoolState
池的状态
值 | 说明 |
---|---|
new | |
offline | |
online |
联机和正常 |
unhealthy |
IdentityRef
名称 | 类型 | 说明 |
---|---|---|
_links |
此字段包含有关图形主题的零个或多个有趣的链接。 可以调用这些链接以获取有关此图形主题的其他关系或更详细的信息。 |
|
descriptor |
string |
描述符是在系统运行时引用图形主题的主要方法。 此字段将唯一标识帐户和组织中的同一图形主题。 |
directoryAlias |
string |
已弃用 - 可以通过查询 IdentityRef“_links”字典的“self”条目中引用的 Graph 用户来检索 |
displayName |
string |
这是图形主题的非唯一显示名称。 若要更改此字段,必须在源提供程序中更改其值。 |
id |
string |
|
imageUrl |
string |
已弃用 - 在 IdentityRef“_links”字典的“虚拟形象”条目中可用 |
inactive |
boolean |
已弃用 - 可以通过查询 GraphUser“_links”字典的“membershipState”条目中引用的 Graph 成员身份状态来检索 |
isAadIdentity |
boolean |
已弃用 - 可以从描述符的主题类型推断(Descriptor.IsAadUserType/Descriptor.IsAadGroupType) |
isContainer |
boolean |
已弃用 - 可以从描述符的主题类型推断(描述符.IsGroupType) |
isDeletedInOrigin |
boolean |
|
profileUrl |
string |
已弃用 - 不在 ToIdentityRef 的大多数预先存在的实现中使用 |
uniqueName |
string |
已弃用 - 请改用 Domain+PrincipalName |
url |
string |
此 URL 是指向此图形主题的源资源的完整路由。 |
OperatingSystemType
池中节点的作系统类型
值 | 说明 |
---|---|
linux | |
windows |
OrchestrationType
池中节点的作系统类型
值 | 说明 |
---|---|
flexible | |
uniform |
PropertiesCollection
类将属性包表示为键值对的集合。 接受除 TypeCode != TypeCode.Object
以外的所有基元类型(具有 DBNull
的任何类型)的值。 Byte[]、Int32、Double、DateType 和 String 类型的值将保留其类型,其他基元将重新调整为 String。 Byte[] 应为 base64 编码字符串。
名称 | 类型 | 说明 |
---|---|---|
count |
integer (int32) |
集合中的属性计数。 |
item |
object |
|
keys |
string[] |
集合中的键集。 |
values |
string[] |
集合中的值集。 |
ReferenceLinks
表示 REST 引用链接集合的类。
名称 | 类型 | 说明 |
---|---|---|
links |
object |
链接的只读视图。 由于引用链接是只读的,因此我们只想将其公开为只读链接。 |
TaskAgentPool
代理的组织级分组。
名称 | 类型 | 说明 |
---|---|---|
agentCloudId |
integer (int32) |
关联的代理云的 ID。 |
autoProvision |
boolean |
是否应为每个项目集合自动预配队列。 |
autoSize |
boolean |
池是否应根据代理云提供程序设置自动调整自身大小。 |
autoUpdate |
boolean |
是否允许此池中的代理自动更新 |
createdBy |
池的创建者。 池的创建者会自动添加到创建池的管理员组中。 |
|
createdOn |
string (date-time) |
池创建的日期/时间。 |
id |
integer (int32) |
|
isHosted |
boolean |
获取或设置一个值,该值指示此池是否由服务管理。 |
isLegacy |
boolean |
确定池是否为旧池。 |
name |
string |
|
options |
其他池设置和详细信息 |
|
owner |
池的所有者或管理员。 |
|
poolType |
获取或设置池的类型 |
|
properties |
类将属性包表示为键值对的集合。 接受除 |
|
scope |
string (uuid) |
|
size |
integer (int32) |
获取池的当前大小。 |
targetSize |
integer (int32) |
目标并行度 - 仅适用于池提供程序支持的代理池。 常规池将为 null。 |
TaskAgentPoolOptions
其他池设置和详细信息
值 | 说明 |
---|---|
elasticPool |
由弹性池服务支持的 TaskAgentPool |
none | |
preserveAgentOnJobFailure |
如果在 TaskAgentJobRequest 失败后保留代理进行调查,则设置为 true |
singleUseAgents |
如果代理在每个 TaskAgentJobRequest 之后重新映像,则设置为 true |
TaskAgentPoolReference
名称 | 类型 | 说明 |
---|---|---|
id |
integer (int32) |
|
isHosted |
boolean |
获取或设置一个值,该值指示此池是否由服务管理。 |
isLegacy |
boolean |
确定池是否为旧池。 |
name |
string |
|
options |
其他池设置和详细信息 |
|
poolType |
获取或设置池的类型 |
|
scope |
string (uuid) |
|
size |
integer (int32) |
获取池的当前大小。 |
TaskAgentPoolType
获取或设置池的类型
值 | 说明 |
---|---|
automation |
任务代理的典型池 |
deployment |
部署池 |
TaskAgentQueue
代理队列。
名称 | 类型 | 说明 |
---|---|---|
id |
integer (int32) |
队列的 ID |
name |
string |
队列的名称 |
pool |
此队列的池参考 |
|
projectId |
string (uuid) |
项目 ID |