azuredevops.getTeams
Explore with Pulumi AI
Use this data source to access information about existing Teams in a Project or globally within an Azure DevOps organization
Relevant Links
PAT Permissions Required
- vso.project: Grants the ability to read projects and teams.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() =>
{
var example = AzureDevOps.GetTeams.Invoke();
return new Dictionary<string, object?>
{
["projectId"] = new[]
{
example.Apply(getTeamsResult => getTeamsResult.Teams),
}.Select(__item => __item?.ProjectId).ToList(),
["name"] = new[]
{
example.Apply(getTeamsResult => getTeamsResult.Teams),
}.Select(__item => __item?.Name).ToList(),
["alladministrators"] = new[]
{
example.Apply(getTeamsResult => getTeamsResult.Teams),
}.Select(__item => __item?.Administrators).ToList(),
["administrators"] = new[]
{
example.Apply(getTeamsResult => getTeamsResult.Teams),
}.Select(__item => __item?.Members).ToList(),
};
});
Coming soon!
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.GetTeamsArgs;
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.getTeams();
ctx.export("projectId", example.applyValue(getTeamsResult -> getTeamsResult.teams()).stream().map(element -> element.projectId()).collect(toList()));
ctx.export("name", example.applyValue(getTeamsResult -> getTeamsResult.teams()).stream().map(element -> element.name()).collect(toList()));
ctx.export("alladministrators", example.applyValue(getTeamsResult -> getTeamsResult.teams()).stream().map(element -> element.administrators()).collect(toList()));
ctx.export("administrators", example.applyValue(getTeamsResult -> getTeamsResult.teams()).stream().map(element -> element.members()).collect(toList()));
}
}
import pulumi
import pulumi_azuredevops as azuredevops
example = azuredevops.get_teams()
pulumi.export("projectId", [__item.project_id for __item in [example.teams]])
pulumi.export("name", [__item.name for __item in [example.teams]])
pulumi.export("alladministrators", [__item.administrators for __item in [example.teams]])
pulumi.export("administrators", [__item.members for __item in [example.teams]])
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const example = azuredevops.getTeams({});
export const projectId = [example.then(example => example.teams)].map(__item => __item?.projectId);
export const name = [example.then(example => example.teams)].map(__item => __item?.name);
export const alladministrators = [example.then(example => example.teams)].map(__item => __item?.administrators);
export const administrators = [example.then(example => example.teams)].map(__item => __item?.members);
Coming soon!
Using getTeams
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 getTeams(args: GetTeamsArgs, opts?: InvokeOptions): Promise<GetTeamsResult>
function getTeamsOutput(args: GetTeamsOutputArgs, opts?: InvokeOptions): Output<GetTeamsResult>
def get_teams(project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTeamsResult
def get_teams_output(project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTeamsResult]
func GetTeams(ctx *Context, args *GetTeamsArgs, opts ...InvokeOption) (*GetTeamsResult, error)
func GetTeamsOutput(ctx *Context, args *GetTeamsOutputArgs, opts ...InvokeOption) GetTeamsResultOutput
> Note: This function is named GetTeams
in the Go SDK.
public static class GetTeams
{
public static Task<GetTeamsResult> InvokeAsync(GetTeamsArgs args, InvokeOptions? opts = null)
public static Output<GetTeamsResult> Invoke(GetTeamsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTeamsResult> getTeams(GetTeamsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azuredevops:index/getTeams:getTeams
arguments:
# arguments dictionary
The following arguments are supported:
- Project
Id string The Project ID. If no project ID all teams of the organization will be returned.
- Project
Id string The Project ID. If no project ID all teams of the organization will be returned.
- project
Id String The Project ID. If no project ID all teams of the organization will be returned.
- project
Id string The Project ID. If no project ID all teams of the organization will be returned.
- project_
id str The Project ID. If no project ID all teams of the organization will be returned.
- project
Id String The Project ID. If no project ID all teams of the organization will be returned.
getTeams Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Teams
List<Pulumi.
Azure Dev Ops. Outputs. Get Teams Team> A list of existing projects in your Azure DevOps Organization with details about every project which includes:
- Project
Id string Project identifier.
- `id - Team identifier
- Id string
The provider-assigned unique ID for this managed resource.
- Teams
[]Get
Teams Team A list of existing projects in your Azure DevOps Organization with details about every project which includes:
- Project
Id string Project identifier.
- `id - Team identifier
- id String
The provider-assigned unique ID for this managed resource.
- teams
List<Get
Teams Team> A list of existing projects in your Azure DevOps Organization with details about every project which includes:
- project
Id String Project identifier.
- `id - Team identifier
- id string
The provider-assigned unique ID for this managed resource.
- teams
Get
Teams Team[] A list of existing projects in your Azure DevOps Organization with details about every project which includes:
- project
Id string Project identifier.
- `id - Team identifier
- id str
The provider-assigned unique ID for this managed resource.
- teams
Sequence[Get
Teams Team] A list of existing projects in your Azure DevOps Organization with details about every project which includes:
- project_
id str Project identifier.
- `id - Team identifier
- id String
The provider-assigned unique ID for this managed resource.
- teams List<Property Map>
A list of existing projects in your Azure DevOps Organization with details about every project which includes:
- project
Id String Project identifier.
- `id - Team identifier
Supporting Types
GetTeamsTeam
- Administrators List<string>
List of subject descriptors for
administrators
of the team.- Description string
Team description.
- Id string
- Members List<string>
List of subject descriptors for
members
of the team.- Name string
Team name.
- Project
Id string The Project ID. If no project ID all teams of the organization will be returned.
- Administrators []string
List of subject descriptors for
administrators
of the team.- Description string
Team description.
- Id string
- Members []string
List of subject descriptors for
members
of the team.- Name string
Team name.
- Project
Id string The Project ID. If no project ID all teams of the organization will be returned.
- administrators List<String>
List of subject descriptors for
administrators
of the team.- description String
Team description.
- id String
- members List<String>
List of subject descriptors for
members
of the team.- name String
Team name.
- project
Id String The Project ID. If no project ID all teams of the organization will be returned.
- administrators string[]
List of subject descriptors for
administrators
of the team.- description string
Team description.
- id string
- members string[]
List of subject descriptors for
members
of the team.- name string
Team name.
- project
Id string The Project ID. If no project ID all teams of the organization will be returned.
- administrators Sequence[str]
List of subject descriptors for
administrators
of the team.- description str
Team description.
- id str
- members Sequence[str]
List of subject descriptors for
members
of the team.- name str
Team name.
- project_
id str The Project ID. If no project ID all teams of the organization will be returned.
- administrators List<String>
List of subject descriptors for
administrators
of the team.- description String
Team description.
- id String
- members List<String>
List of subject descriptors for
members
of the team.- name String
Team name.
- project
Id String The Project ID. If no project ID all teams of the organization will be returned.
Package Details
- Repository
- Azure DevOps pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azuredevops
Terraform Provider.