1. Packages
  2. Azure DevOps Provider
  3. API Docs
  4. getPools
Azure DevOps v3.8.0 published on Monday, Mar 17, 2025 by Pulumi

azuredevops.getPools

Explore with Pulumi AI

Azure DevOps v3.8.0 published on Monday, Mar 17, 2025 by Pulumi

Use this data source to access information about existing Agent Pools within Azure DevOps.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const example = azuredevops.getPools({});
export const agentPoolName = example.then(example => example.agentPools.map(__item => __item.name));
export const autoProvision = example.then(example => example.agentPools.map(__item => __item.autoProvision));
export const autoUpdate = example.then(example => example.agentPools.map(__item => __item.autoUpdate));
export const poolType = example.then(example => example.agentPools.map(__item => __item.poolType));
Copy
import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.get_pools()
pulumi.export("agentPoolName", [__item.name for __item in example.agent_pools])
pulumi.export("autoProvision", [__item.auto_provision for __item in example.agent_pools])
pulumi.export("autoUpdate", [__item.auto_update for __item in example.agent_pools])
pulumi.export("poolType", [__item.pool_type for __item in example.agent_pools])
Copy
package main

import (
	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := azuredevops.GetPools(ctx, map[string]interface{}{
}, nil);
if err != nil {
return err
}
ctx.Export("agentPoolName", pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:3,11-37)))
ctx.Export("autoProvision", pulumi.BoolArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:7,11-46)))
ctx.Export("autoUpdate", pulumi.BoolArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:11,11-43)))
ctx.Export("poolType", pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:15,11-41)))
return nil
})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

return await Deployment.RunAsync(() => 
{
    var example = AzureDevOps.GetPools.Invoke();

    return new Dictionary<string, object?>
    {
        ["agentPoolName"] = example.Apply(getPoolsResult => getPoolsResult.AgentPools).Select(__item => __item.Name).ToList(),
        ["autoProvision"] = example.Apply(getPoolsResult => getPoolsResult.AgentPools).Select(__item => __item.AutoProvision).ToList(),
        ["autoUpdate"] = example.Apply(getPoolsResult => getPoolsResult.AgentPools).Select(__item => __item.AutoUpdate).ToList(),
        ["poolType"] = example.Apply(getPoolsResult => getPoolsResult.AgentPools).Select(__item => __item.PoolType).ToList(),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.AzuredevopsFunctions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = AzuredevopsFunctions.getPools();

        ctx.export("agentPoolName", example.applyValue(getPoolsResult -> getPoolsResult.agentPools()).stream().map(element -> element.name()).collect(toList()));
        ctx.export("autoProvision", example.applyValue(getPoolsResult -> getPoolsResult.agentPools()).stream().map(element -> element.autoProvision()).collect(toList()));
        ctx.export("autoUpdate", example.applyValue(getPoolsResult -> getPoolsResult.agentPools()).stream().map(element -> element.autoUpdate()).collect(toList()));
        ctx.export("poolType", example.applyValue(getPoolsResult -> getPoolsResult.agentPools()).stream().map(element -> element.poolType()).collect(toList()));
    }
}
Copy
Coming soon!

Using getPools

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getPools(opts?: InvokeOptions): Promise<GetPoolsResult>
function getPoolsOutput(opts?: InvokeOptions): Output<GetPoolsResult>
Copy
def get_pools(opts: Optional[InvokeOptions] = None) -> GetPoolsResult
def get_pools_output(opts: Optional[InvokeOptions] = None) -> Output[GetPoolsResult]
Copy
func GetPools(ctx *Context, opts ...InvokeOption) (*GetPoolsResult, error)
func GetPoolsOutput(ctx *Context, opts ...InvokeOption) GetPoolsResultOutput
Copy

> Note: This function is named GetPools in the Go SDK.

public static class GetPools 
{
    public static Task<GetPoolsResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetPoolsResult> Invoke(InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPoolsResult> getPools(InvokeOptions options)
public static Output<GetPoolsResult> getPools(InvokeOptions options)
Copy
fn::invoke:
  function: azuredevops:index/getPools:getPools
  arguments:
    # arguments dictionary
Copy

getPools Result

The following output properties are available:

AgentPools List<Pulumi.AzureDevOps.Outputs.GetPoolsAgentPool>
An agent_pools blocks as documented below. A list of existing agent pools in your Azure DevOps Organization with the following details about every agent pool:
Id string
The provider-assigned unique ID for this managed resource.
AgentPools []GetPoolsAgentPool
An agent_pools blocks as documented below. A list of existing agent pools in your Azure DevOps Organization with the following details about every agent pool:
Id string
The provider-assigned unique ID for this managed resource.
agentPools List<GetPoolsAgentPool>
An agent_pools blocks as documented below. A list of existing agent pools in your Azure DevOps Organization with the following details about every agent pool:
id String
The provider-assigned unique ID for this managed resource.
agentPools GetPoolsAgentPool[]
An agent_pools blocks as documented below. A list of existing agent pools in your Azure DevOps Organization with the following details about every agent pool:
id string
The provider-assigned unique ID for this managed resource.
agent_pools Sequence[GetPoolsAgentPool]
An agent_pools blocks as documented below. A list of existing agent pools in your Azure DevOps Organization with the following details about every agent pool:
id str
The provider-assigned unique ID for this managed resource.
agentPools List<Property Map>
An agent_pools blocks as documented below. A list of existing agent pools in your Azure DevOps Organization with the following details about every agent pool:
id String
The provider-assigned unique ID for this managed resource.

Supporting Types

GetPoolsAgentPool

AutoProvision This property is required. bool
Specifies whether or not a queue should be automatically provisioned for each project collection.
AutoUpdate This property is required. bool
Specifies whether or not agents within the pool should be automatically updated.
Id This property is required. int
The ID of the agent pool.
Name This property is required. string
The name of the agent pool.
PoolType This property is required. string
Specifies whether the agent pool type is Automation or Deployment.
AutoProvision This property is required. bool
Specifies whether or not a queue should be automatically provisioned for each project collection.
AutoUpdate This property is required. bool
Specifies whether or not agents within the pool should be automatically updated.
Id This property is required. int
The ID of the agent pool.
Name This property is required. string
The name of the agent pool.
PoolType This property is required. string
Specifies whether the agent pool type is Automation or Deployment.
autoProvision This property is required. Boolean
Specifies whether or not a queue should be automatically provisioned for each project collection.
autoUpdate This property is required. Boolean
Specifies whether or not agents within the pool should be automatically updated.
id This property is required. Integer
The ID of the agent pool.
name This property is required. String
The name of the agent pool.
poolType This property is required. String
Specifies whether the agent pool type is Automation or Deployment.
autoProvision This property is required. boolean
Specifies whether or not a queue should be automatically provisioned for each project collection.
autoUpdate This property is required. boolean
Specifies whether or not agents within the pool should be automatically updated.
id This property is required. number
The ID of the agent pool.
name This property is required. string
The name of the agent pool.
poolType This property is required. string
Specifies whether the agent pool type is Automation or Deployment.
auto_provision This property is required. bool
Specifies whether or not a queue should be automatically provisioned for each project collection.
auto_update This property is required. bool
Specifies whether or not agents within the pool should be automatically updated.
id This property is required. int
The ID of the agent pool.
name This property is required. str
The name of the agent pool.
pool_type This property is required. str
Specifies whether the agent pool type is Automation or Deployment.
autoProvision This property is required. Boolean
Specifies whether or not a queue should be automatically provisioned for each project collection.
autoUpdate This property is required. Boolean
Specifies whether or not agents within the pool should be automatically updated.
id This property is required. Number
The ID of the agent pool.
name This property is required. String
The name of the agent pool.
poolType This property is required. String
Specifies whether the agent pool type is Automation or Deployment.

Package Details

Repository
Azure DevOps pulumi/pulumi-azuredevops
License
Apache-2.0
Notes
This Pulumi package is based on the azuredevops Terraform Provider.
Azure DevOps v3.8.0 published on Monday, Mar 17, 2025 by Pulumi