Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 如何使用RESTAPI将变量组链接到azure管道?_Powershell_Azure Devops_Azure Powershell_Azure Devops Rest Api - Fatal编程技术网

Powershell 如何使用RESTAPI将变量组链接到azure管道?

Powershell 如何使用RESTAPI将变量组链接到azure管道?,powershell,azure-devops,azure-powershell,azure-devops-rest-api,Powershell,Azure Devops,Azure Powershell,Azure Devops Rest Api,是否可以使用Rest API将变量组添加到Azure管道?是的,有一个Rest API可以添加变量组: 例如: POST https://dev.azure.com/fabrikam/DGDemo/_apis/distributedtask/variablegroups?api-version=5.1-preview.1 正文: 请详细说明你的问题。详细展示你想要实现的目标,你所说的变量组是什么意思,展示你迄今为止所做的尝试以及你遇到的困难。请阅读。现在,你可能根本得不到答案,或者有人会简单地

是否可以使用Rest API将变量组添加到Azure管道?

是的,有一个Rest API可以添加变量组:

例如:

POST https://dev.azure.com/fabrikam/DGDemo/_apis/distributedtask/variablegroups?api-version=5.1-preview.1
正文:


请详细说明你的问题。详细展示你想要实现的目标,你所说的变量组是什么意思,展示你迄今为止所做的尝试以及你遇到的困难。请阅读。现在,你可能根本得不到答案,或者有人会简单地回答“也许”
POST https://dev.azure.com/fabrikam/DGDemo/_apis/distributedtask/variablegroups?api-version=5.1-preview.1
{
  "variables": {
    "key1": {
      "value": "value1"
    },
    "key2": {
      "value": "value2",
      "isSecret": true
    }
  },
  "type": "Vsts",
  "name": "TestVariableGroup1",
  "description": "A test variable group"
}