Variablegroups - Update
更新变量组。
PUT https://dev.azure.com/{organization}/{project}/_apis/distributedtask/variablegroups/{groupId}?api-version=5.1-preview.1
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
group
|
path | True |
integer int32 |
要更新的变量组的 ID。 |
|
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
|
project
|
path | True |
string |
项目 ID 或项目名称 |
|
api-version
|
query | True |
string |
要使用的 API 版本。 这应设置为“5.1-preview.1”才能使用此版本的 API。 |
请求正文
| 名称 | 类型 | 说明 |
|---|---|---|
| description |
string |
设置变量组的说明。 |
| name |
string |
设置变量组的名称。 |
| providerData |
设置提供程序数据。 |
|
| type |
string |
设置变量组的类型。 |
| variables |
<string,
Variable |
设置变量组中包含的变量。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 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.variablegroups_manage | 授予读取、创建和管理变量组的能力。 |
示例
Update a variable group
示例请求
PUT https://dev.azure.com/fabrikam/DGDemo/_apis/distributedtask/variablegroups/1?api-version=5.1-preview.1
{
"variables": {
"key1": {
"value": "value1"
},
"key2": {
"value": null,
"isSecret": true
}
},
"type": "Vsts",
"name": "TestVariableGroup1",
"description": "Updated variable group"
}
示例响应
{
"variables": {
"key1": {
"value": "value1"
},
"key2": {
"value": null,
"isSecret": true
}
},
"id": 1,
"type": "Vsts",
"name": "TestVariableGroup1",
"description": "Updated variable group",
"createdBy": {
"id": "4adb1680-0eac-6149-b5ee-fc8b4f6ca227"
},
"createdOn": "2017-12-12T06:35:51.6933333Z",
"modifiedBy": {
"id": "4adb1680-0eac-6149-b5ee-fc8b4f6ca227"
},
"modifiedOn": "2017-12-12T06:35:52.0166667Z"
}
定义
| 名称 | 说明 |
|---|---|
|
Identity |
|
|
Reference |
表示 REST 引用链接集合的类。 |
|
Variable |
变量组是相关变量的集合。 |
|
Variable |
|
|
Variable |
定义变量组的提供程序数据。 |
|
Variable |
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 |
链接的只读视图。 由于引用链接是只读的,因此我们只想将其公开为只读。 |
VariableGroup
变量组是相关变量的集合。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdBy |
获取或设置创建变量组的标识。 |
|
| createdOn |
string |
获取或设置创建变量组的时间。 |
| description |
string |
获取或设置变量组的说明。 |
| id |
integer |
获取或设置变量组的 ID。 |
| isShared |
boolean |
指示变量组是否与其他项目共享。 |
| modifiedBy |
获取或设置修改变量组的标识。 |
|
| modifiedOn |
string |
获取或设置修改变量组的时间 |
| name |
string |
获取或设置变量组的名称。 |
| providerData |
获取或设置提供程序数据。 |
|
| type |
string |
获取或设置变量组的类型。 |
| variables |
<string,
Variable |
获取或设置变量组中包含的变量。 |
VariableGroupParameters
| 名称 | 类型 | 说明 |
|---|---|---|
| description |
string |
设置变量组的说明。 |
| name |
string |
设置变量组的名称。 |
| providerData |
设置提供程序数据。 |
|
| type |
string |
设置变量组的类型。 |
| variables |
<string,
Variable |
设置变量组中包含的变量。 |
VariableGroupProviderData
定义变量组的提供程序数据。
VariableValue
| 名称 | 类型 | 说明 |
|---|---|---|
| isSecret |
boolean |
|
| value |
string |