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

azuredevops.getTeam

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 Team in a Project within Azure DevOps.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuredevops from "@pulumi/azuredevops";
    
    const exampleProject = new azuredevops.Project("exampleProject", {
        workItemTemplate: "Agile",
        versionControl: "Git",
        visibility: "private",
        description: "Managed by Terraform",
    });
    const exampleTeam = azuredevops.getTeamOutput({
        projectId: exampleProject.id,
        name: "Example Project Team",
    });
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example_project = azuredevops.Project("exampleProject",
        work_item_template="Agile",
        version_control="Git",
        visibility="private",
        description="Managed by Terraform")
    example_team = azuredevops.get_team_output(project_id=example_project.id,
        name="Example Project Team")
    
    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 {
    		exampleProject, err := azuredevops.NewProject(ctx, "exampleProject", &azuredevops.ProjectArgs{
    			WorkItemTemplate: pulumi.String("Agile"),
    			VersionControl:   pulumi.String("Git"),
    			Visibility:       pulumi.String("private"),
    			Description:      pulumi.String("Managed by Terraform"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = azuredevops.LookupTeamOutput(ctx, azuredevops.GetTeamOutputArgs{
    			ProjectId: exampleProject.ID(),
    			Name:      pulumi.String("Example Project Team"),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureDevOps = Pulumi.AzureDevOps;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleProject = new AzureDevOps.Project("exampleProject", new()
        {
            WorkItemTemplate = "Agile",
            VersionControl = "Git",
            Visibility = "private",
            Description = "Managed by Terraform",
        });
    
        var exampleTeam = AzureDevOps.GetTeam.Invoke(new()
        {
            ProjectId = exampleProject.Id,
            Name = "Example Project Team",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuredevops.Project;
    import com.pulumi.azuredevops.ProjectArgs;
    import com.pulumi.azuredevops.AzuredevopsFunctions;
    import com.pulumi.azuredevops.inputs.GetTeamArgs;
    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) {
            var exampleProject = new Project("exampleProject", ProjectArgs.builder()        
                .workItemTemplate("Agile")
                .versionControl("Git")
                .visibility("private")
                .description("Managed by Terraform")
                .build());
    
            final var exampleTeam = AzuredevopsFunctions.getTeam(GetTeamArgs.builder()
                .projectId(exampleProject.id())
                .name("Example Project Team")
                .build());
    
        }
    }
    
    resources:
      exampleProject:
        type: azuredevops:Project
        properties:
          workItemTemplate: Agile
          versionControl: Git
          visibility: private
          description: Managed by Terraform
    variables:
      exampleTeam:
        fn::invoke:
          Function: azuredevops:getTeam
          Arguments:
            projectId: ${exampleProject.id}
            name: Example Project Team
    

    PAT Permissions Required

    • vso.project: Grants the ability to read projects and teams.

    Using getTeam

    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 getTeam(args: GetTeamArgs, opts?: InvokeOptions): Promise<GetTeamResult>
    function getTeamOutput(args: GetTeamOutputArgs, opts?: InvokeOptions): Output<GetTeamResult>
    def get_team(name: Optional[str] = None,
                 project_id: Optional[str] = None,
                 top: Optional[int] = None,
                 opts: Optional[InvokeOptions] = None) -> GetTeamResult
    def get_team_output(name: Optional[pulumi.Input[str]] = None,
                 project_id: Optional[pulumi.Input[str]] = None,
                 top: Optional[pulumi.Input[int]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetTeamResult]
    func LookupTeam(ctx *Context, args *LookupTeamArgs, opts ...InvokeOption) (*LookupTeamResult, error)
    func LookupTeamOutput(ctx *Context, args *LookupTeamOutputArgs, opts ...InvokeOption) LookupTeamResultOutput

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

    public static class GetTeam 
    {
        public static Task<GetTeamResult> InvokeAsync(GetTeamArgs args, InvokeOptions? opts = null)
        public static Output<GetTeamResult> Invoke(GetTeamInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTeamResult> getTeam(GetTeamArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azuredevops:index/getTeam:getTeam
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Team.
    ProjectId string
    The Project ID.
    Top int
    The maximum number of teams to return. Defaults to 100.
    Name string
    The name of the Team.
    ProjectId string
    The Project ID.
    Top int
    The maximum number of teams to return. Defaults to 100.
    name String
    The name of the Team.
    projectId String
    The Project ID.
    top Integer
    The maximum number of teams to return. Defaults to 100.
    name string
    The name of the Team.
    projectId string
    The Project ID.
    top number
    The maximum number of teams to return. Defaults to 100.
    name str
    The name of the Team.
    project_id str
    The Project ID.
    top int
    The maximum number of teams to return. Defaults to 100.
    name String
    The name of the Team.
    projectId String
    The Project ID.
    top Number
    The maximum number of teams to return. Defaults to 100.

    getTeam Result

    The following output properties are available:

    Administrators List<string>
    List of subject descriptors for administrators of the team.
    Description string
    Team description.
    Descriptor string
    The descriptor of the Team.
    Id string
    The provider-assigned unique ID for this managed resource.
    Members List<string>
    List of subject descriptors for members of the team.
    Name string
    ProjectId string
    Top int
    Administrators []string
    List of subject descriptors for administrators of the team.
    Description string
    Team description.
    Descriptor string
    The descriptor of the Team.
    Id string
    The provider-assigned unique ID for this managed resource.
    Members []string
    List of subject descriptors for members of the team.
    Name string
    ProjectId string
    Top int
    administrators List<String>
    List of subject descriptors for administrators of the team.
    description String
    Team description.
    descriptor String
    The descriptor of the Team.
    id String
    The provider-assigned unique ID for this managed resource.
    members List<String>
    List of subject descriptors for members of the team.
    name String
    projectId String
    top Integer
    administrators string[]
    List of subject descriptors for administrators of the team.
    description string
    Team description.
    descriptor string
    The descriptor of the Team.
    id string
    The provider-assigned unique ID for this managed resource.
    members string[]
    List of subject descriptors for members of the team.
    name string
    projectId string
    top number
    administrators Sequence[str]
    List of subject descriptors for administrators of the team.
    description str
    Team description.
    descriptor str
    The descriptor of the Team.
    id str
    The provider-assigned unique ID for this managed resource.
    members Sequence[str]
    List of subject descriptors for members of the team.
    name str
    project_id str
    top int
    administrators List<String>
    List of subject descriptors for administrators of the team.
    description String
    Team description.
    descriptor String
    The descriptor of the Team.
    id String
    The provider-assigned unique ID for this managed resource.
    members List<String>
    List of subject descriptors for members of the team.
    name String
    projectId String
    top Number

    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