Check Configurations - Update
更新检查配置
PATCH https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/configurations/{id}?api-version=7.1-preview.1
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
id
|
path | True |
integer (int32) |
检查配置 ID |
|
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
|
project
|
path | True |
string |
项目 ID 或项目名称 |
|
api-version
|
query | True |
string |
要使用的 API 版本。 这应设置为“7.1-preview.1”才能使用此版本的 API。 |
请求正文
| 名称 | 类型 | 说明 |
|---|---|---|
| _links |
参考链接。 |
|
| createdBy |
配置检查的人员的标识。 |
|
| createdOn |
string (date-time) |
检查配置的时间。 |
| id |
integer (int32) |
检查配置 ID。 |
| isDisabled |
boolean |
已禁用检查。 |
| issue |
连接到检查配置时出现问题。 |
|
| modifiedBy |
修改配置检查的人员的标识。 |
|
| modifiedOn |
string (date-time) |
修改配置的检查的时间。 |
| resource |
配置检查的资源。 |
|
| timeout |
integer (int32) |
检查的超时(以分钟为单位)。 |
| type |
检查配置类型 |
|
| url |
string |
可从中获取配置的检查的 URL。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 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.build_execute | 授予访问生成项目(包括生成结果、定义和请求)以及排队生成、更新生成属性的功能,以及通过服务挂钩接收有关生成事件的通知的能力。 |
| vso.pipelineresources_manage | 授予管理受保护资源或管道使用受保护资源的请求的功能:代理池、环境、队列、存储库、安全文件、服务连接和变量组 |
示例
示例请求
PATCH https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/configurations/{id}?api-version=7.1-preview.1
{
"settings": {
"displayName": "Business Hours Updated",
"definitionRef": {
"id": "445fde2f-6c39-441c-807f-8a59ff2e075f",
"name": "evaluateBusinessHours",
"version": "0.0.1"
},
"inputs": {
"businessDays": "Monday,Tuesday,Wednesday,Thursday,Friday",
"timeZone": "UTC",
"startTime": "04:00",
"endTime": "12:00"
},
"retryInterval": 5
},
"timeout": 43200,
"type": {
"id": "fe1de3ee-a436-41b4-bb20-f6eb4cb879a7",
"name": "Task Check"
},
"resource": {
"type": "queue",
"id": "1",
"name": "Default"
}
}
示例响应
request-Context: appId=cid-v1:a892bfef-0287-4640-9f5e-cffc90fbcf94
access-Control-Expose-Headers: Request-Context
{
"settings": {
"displayName": "Business Hours Updated",
"definitionRef": {
"id": "445fde2f-6c39-441c-807f-8a59ff2e075f",
"name": "evaluateBusinessHours",
"version": "0.0.1"
},
"inputs": {
"businessDays": "Monday,Tuesday,Wednesday,Thursday,Friday",
"timeZone": "UTC",
"startTime": "04:00",
"endTime": "12:00"
},
"retryInterval": 5
},
"createdBy": {
"displayName": "User Name",
"id": "3b3db741-9d03-4e32-a7c0-6c3dfc2013c1",
"uniqueName": "uniqueName",
"descriptor": "Descriptor"
},
"createdOn": "2020-11-19T11:50:29.2550665Z",
"modifiedBy": {
"displayName": "User Name",
"id": "3b3db741-9d03-4e32-a7c0-6c3dfc2013c1",
"uniqueName": "uniqueName",
"descriptor": "Descriptor"
},
"modifiedOn": "2020-11-19T12:26:25.7610862Z",
"timeout": 43200,
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/d6b3e0ea-8197-4dec-831b-50e2e06ff95f/_apis/pipelines/checks/configurations/27"
}
},
"id": 27,
"type": {
"id": "fe1de3ee-a436-41b4-bb20-f6eb4cb879a7",
"name": "Task Check"
},
"url": "https://dev.azure.com/fabrikam/d6b3e0ea-8197-4dec-831b-50e2e06ff95f/_apis/pipelines/checks/configurations/27",
"resource": {
"type": "queue",
"id": "1",
"name": "Default"
}
}
定义
| 名称 | 说明 |
|---|---|
|
Check |
|
|
Check |
与检查配置关联的问题(错误、警告)。 |
|
Check |
问题的类型(错误、警告)。 |
|
Check |
|
|
Identity |
|
|
Reference |
表示 REST 引用链接集合的类。 |
| Resource |
CheckConfiguration
| 名称 | 类型 | 说明 |
|---|---|---|
| _links |
参考链接。 |
|
| createdBy |
配置检查的人员的标识。 |
|
| createdOn |
string (date-time) |
检查配置的时间。 |
| id |
integer (int32) |
检查配置 ID。 |
| isDisabled |
boolean |
已禁用检查。 |
| issue |
连接到检查配置时出现问题。 |
|
| modifiedBy |
修改配置检查的人员的标识。 |
|
| modifiedOn |
string (date-time) |
修改配置的检查的时间。 |
| resource |
配置检查的资源。 |
|
| timeout |
integer (int32) |
检查的超时(以分钟为单位)。 |
| type |
检查配置类型 |
|
| url |
string |
可从中获取配置的检查的 URL。 |
CheckIssue
与检查配置关联的问题(错误、警告)。
| 名称 | 类型 | 说明 |
|---|---|---|
| description |
string |
检查的简短摘要 - 其名称和资源。 |
| detailedMessage |
string |
问题的更详细说明。 |
| message |
string |
问题的说明。 |
| type |
问题的类型(错误、警告)。 |
CheckIssueType
问题的类型(错误、警告)。
| 值 | 说明 |
|---|---|
| error | |
| warning |
CheckType
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string (uuid) |
获取或设置检查类型 ID。 |
| name |
string |
检查类型的名称。 |
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 是指向此图形主题的源资源的完整路由。 |
ReferenceLinks
表示 REST 引用链接集合的类。
| 名称 | 类型 | 说明 |
|---|---|---|
| links |
object |
链接的只读视图。 由于引用链接是只读的,因此我们只想将其公开为只读链接。 |
Resource
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源的 ID。 |
| name |
string |
资源的名称。 |
| type |
string |
资源的类型。 |