Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi
azuredevops.getTeam
Explore with Pulumi AI
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("example", {
name: "Example Project",
workItemTemplate: "Agile",
versionControl: "Git",
visibility: "private",
description: "Managed by Terraform",
});
const example = azuredevops.getTeamOutput({
projectId: exampleProject.id,
name: "Example Project Team",
});
import pulumi
import pulumi_azuredevops as azuredevops
example_project = azuredevops.Project("example",
name="Example Project",
work_item_template="Agile",
version_control="Git",
visibility="private",
description="Managed by Terraform")
example = 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, "example", &azuredevops.ProjectArgs{
Name: pulumi.String("Example Project"),
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("example", new()
{
Name = "Example Project",
WorkItemTemplate = "Agile",
VersionControl = "Git",
Visibility = "private",
Description = "Managed by Terraform",
});
var example = 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()
.name("Example Project")
.workItemTemplate("Agile")
.versionControl("Git")
.visibility("private")
.description("Managed by Terraform")
.build());
final var example = AzuredevopsFunctions.getTeam(GetTeamArgs.builder()
.projectId(exampleProject.id())
.name("Example Project Team")
.build());
}
}
resources:
exampleProject:
type: azuredevops:Project
name: example
properties:
name: Example Project
workItemTemplate: Agile
versionControl: Git
visibility: private
description: Managed by Terraform
variables:
example:
fn::invoke:
Function: azuredevops:getTeam
Arguments:
projectId: ${exampleProject.id}
name: Example Project Team
Relevant Links
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 str
- The name of the Team.
- project_
id str - The Project ID.
- top int
- 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
- Project
Id 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
- Project
Id 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
- project
Id 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
- project
Id 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
- project
Id 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.