![](/img/trans.png)
[英]Can not create Agent Pool by code (no permissions) at Azure DevOps 2019
[英]How to create Agent Pool in Azure DevOps via C# client?
如何通過 C# 客戶端在 Azure DevOps 中創建代理池?
我找到了一些用於代理池的原始休息 api, 例如本文檔。
但我想通過 C# 客戶端創建代理池。
現在我使用Microsoft.TeamFoundationServer.ExtendedClient
庫,但找不到解決方案。
您還需要Microsoft.TeamFoundation.DistributedTask.WebApi nuget 包:
VssConnection connection = new VssConnection(new Uri("URL"), new VssCredentials());
var client = connection.GetClient<TaskAgentHttpClient>();
client.AddAgentPoolAsync(new TaskAgentPool("TestPool"));
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.