1. Packages
  2. AzureDevOps
  3. API Docs
  4. getPool
Azure DevOps v3.0.0 published on Friday, Mar 15, 2024 by Pulumi

azuredevops.getPool

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.0.0 published on Friday, Mar 15, 2024 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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    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}
    

    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
    AutoUpdate bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    PoolType string
    AutoProvision bool
    AutoUpdate bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    PoolType string
    autoProvision Boolean
    autoUpdate Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    poolType String
    autoProvision boolean
    autoUpdate boolean
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    poolType string
    auto_provision bool
    auto_update bool
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    pool_type str
    autoProvision Boolean
    autoUpdate Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    poolType String

    Package Details

    Repository
    Azure DevOps pulumi/pulumi-azuredevops
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuredevops Terraform Provider.
    azuredevops logo
    Azure DevOps v3.0.0 published on Friday, Mar 15, 2024 by Pulumi