AzureDevOps

Pulumi Official
Package maintained by Pulumi
v2.5.0 published on Monday, Jul 25, 2022 by Pulumi

getPool

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

Example Usage

using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AzureDevOps.GetPool.InvokeAsync(new AzureDevOps.GetPoolArgs
        {
            Name = "Example Agent Pool",
        }));
        this.Name = example.Apply(example => example.Name);
        this.PoolType = example.Apply(example => example.PoolType);
        this.AutoProvision = example.Apply(example => example.AutoProvision);
    }

    [Output("name")]
    public Output<string> Name { get; set; }
    [Output("poolType")]
    public Output<string> PoolType { get; set; }
    [Output("autoProvision")]
    public Output<string> AutoProvision { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-azuredevops/sdk/v2/go/azuredevops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := azuredevops.LookupPool(ctx, &GetPoolArgs{
			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)
		return nil
	})
}
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.Agent.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()));
    }
}
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)
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);
variables:
  example:
    Fn::Invoke:
      Function: azuredevops:getPool
      Arguments:
        name: Example Agent Pool
outputs:
  name: ${example.name}
  poolType: ${example.poolType}
  autoProvision: ${example.autoProvision}

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>
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]
func LookupPool(ctx *Context, args *LookupPoolArgs, opts ...InvokeOption) (*LookupPoolResult, error)
func LookupPoolOutput(ctx *Context, args *LookupPoolOutputArgs, opts ...InvokeOption) LookupPoolResultOutput

> 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)
}
public static CompletableFuture<GetPoolResult> getPool(GetPoolArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azuredevops:index/getPool:getPool
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

Name of the Agent Pool.

Name string

Name of the Agent Pool.

name String

Name of the Agent Pool.

name string

Name of the Agent Pool.

name str

Name of the Agent Pool.

name String

Name of the Agent Pool.

getPool Result

The following output properties are available:

AutoProvision bool
Id string

The provider-assigned unique ID for this managed resource.

Name string
PoolType string
AutoProvision bool
Id string

The provider-assigned unique ID for this managed resource.

Name string
PoolType string
autoProvision Boolean
id String

The provider-assigned unique ID for this managed resource.

name String
poolType String
autoProvision boolean
id string

The provider-assigned unique ID for this managed resource.

name string
poolType string
auto_provision bool
id str

The provider-assigned unique ID for this managed resource.

name str
pool_type str
autoProvision Boolean
id String

The provider-assigned unique ID for this managed resource.

name String
poolType String

Package Details

Repository
https://github.com/pulumi/pulumi-azuredevops
License
Apache-2.0
Notes

This Pulumi package is based on the azuredevops Terraform Provider.