If I want to change all of my builds and releases to a new agent queue, is there a way to do that all at once?
The Agent Queue API doesn't have anything about changing which queue is used, and the Build API doesn't have a variable for the queue name. In VSTS, in the Agent Pools tab in settings, I can see a list of pools and the builds that were run on them, but I don't see a way of changing them.
Is there a programmatic way to change them all at once, or do I have to go through and change them all manually?
I'm experimenting on a specific build before fully implementing it in on every build. My program flow right now is: get the build definition, get the queue agent from a build that has the right one, set the queue in the old version equal to the new one, and PUT the whole thing back in VSTS.
$result = Invoke-RestMethod -Method GET -Uri $uri -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)}
$result3 = Invoke-RestMethod -Method GET -Uri $uri3 -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)}
$q = $result3.queue
$result.queue = $q
$result | ConvertTo-JSON
Invoke-RestMethod -Method PUT $uri -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ContentType "application/json" -Body $result
I'm getting the error
Invoke-RestMethod : {"$id":"1","innerException":null,"message":"Value cannot be null.\r\nParameter name:
How do I properly configure the PUT from the GET?
