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

azuredevops.getPool

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 an existing Agent Pool within Azure DevOps.

Example Usage

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

const example = azuredevops.getPool({
    name: "Example Agent Pool",
});
export const name = example.then(example => example.name);
export const poolType = example.then(example => example.poolType);
export const autoProvision = example.then(example => example.autoProvision);
export const autoUpdate = example.then(example => example.autoUpdate);
Copy
import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.get_pool(name="Example Agent Pool")
pulumi.export("name", example.name)
pulumi.export("poolType", example.pool_type)
pulumi.export("autoProvision", example.auto_provision)
pulumi.export("autoUpdate", example.auto_update)
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.LookupPool(ctx, &azuredevops.LookupPoolArgs{
			Name: "Example Agent Pool",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("name", example.Name)
		ctx.Export("poolType", example.PoolType)
		ctx.Export("autoProvision", example.AutoProvision)
		ctx.Export("autoUpdate", example.AutoUpdate)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

return await Deployment.RunAsync(() => 
{
    var example = AzureDevOps.GetPool.Invoke(new()
    {
        Name = "Example Agent Pool",
    });

    return new Dictionary<string, object?>
    {
        ["name"] = example.Apply(getPoolResult => getPoolResult.Name),
        ["poolType"] = example.Apply(getPoolResult => getPoolResult.PoolType),
        ["autoProvision"] = example.Apply(getPoolResult => getPoolResult.AutoProvision),
        ["autoUpdate"] = example.Apply(getPoolResult => getPoolResult.AutoUpdate),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.AzuredevopsFunctions;
import com.pulumi.azuredevops.inputs.GetPoolArgs;
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.getPool(GetPoolArgs.builder()
            .name("Example Agent Pool")
            .build());

        ctx.export("name", example.applyValue(getPoolResult -> getPoolResult.name()));
        ctx.export("poolType", example.applyValue(getPoolResult -> getPoolResult.poolType()));
        ctx.export("autoProvision", example.applyValue(getPoolResult -> getPoolResult.autoProvision()));
        ctx.export("autoUpdate", example.applyValue(getPoolResult -> getPoolResult.autoUpdate()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azuredevops:getPool
      arguments:
        name: Example Agent Pool
outputs:
  name: ${example.name}
  poolType: ${example.poolType}
  autoProvision: ${example.autoProvision}
  autoUpdate: ${example.autoUpdate}
Copy

Using getPool

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 getPool(args: GetPoolArgs, opts?: InvokeOptions): Promise<GetPoolResult>
function getPoolOutput(args: GetPoolOutputArgs, opts?: InvokeOptions): Output<GetPoolResult>
Copy
def get_pool(name: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetPoolResult
def get_pool_output(name: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetPoolResult]
Copy
func LookupPool(ctx *Context, args *LookupPoolArgs, opts ...InvokeOption) (*LookupPoolResult, error)
func LookupPoolOutput(ctx *Context, args *LookupPoolOutputArgs, opts ...InvokeOption) LookupPoolResultOutput
Copy

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

public static class GetPool 
{
    public static Task<GetPoolResult> InvokeAsync(GetPoolArgs args, InvokeOptions? opts = null)
    public static Output<GetPoolResult> Invoke(GetPoolInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPoolResult> getPool(GetPoolArgs args, InvokeOptions options)
public static Output<GetPoolResult> getPool(GetPoolArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azuredevops:index/getPool:getPool
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of the Agent Pool.
Name This property is required. string
Name of the Agent Pool.
name This property is required. String
Name of the Agent Pool.
name This property is required. string
Name of the Agent Pool.
name This property is required. str
Name of the Agent Pool.
name This property is required. String
Name of the Agent Pool.

getPool Result

The following output properties are available:

AutoProvision bool
Specifies whether a queue should be automatically provisioned for each project collection.
AutoUpdate bool
Specifies whether or not agents within the pool should be automatically updated.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the agent pool
PoolType string
Specifies whether the agent pool type is Automation or Deployment.
AutoProvision bool
Specifies whether a queue should be automatically provisioned for each project collection.
AutoUpdate bool
Specifies whether or not agents within the pool should be automatically updated.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the agent pool
PoolType string
Specifies whether the agent pool type is Automation or Deployment.
autoProvision Boolean
Specifies whether a queue should be automatically provisioned for each project collection.
autoUpdate Boolean
Specifies whether or not agents within the pool should be automatically updated.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the agent pool
poolType String
Specifies whether the agent pool type is Automation or Deployment.
autoProvision boolean
Specifies whether a queue should be automatically provisioned for each project collection.
autoUpdate boolean
Specifies whether or not agents within the pool should be automatically updated.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the agent pool
poolType string
Specifies whether the agent pool type is Automation or Deployment.
auto_provision bool
Specifies whether a queue should be automatically provisioned for each project collection.
auto_update bool
Specifies whether or not agents within the pool should be automatically updated.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the agent pool
pool_type str
Specifies whether the agent pool type is Automation or Deployment.
autoProvision Boolean
Specifies whether a queue should be automatically provisioned for each project collection.
autoUpdate Boolean
Specifies whether or not agents within the pool should be automatically updated.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the agent pool
poolType 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