@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
97 lines (96 loc) • 3.58 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* Use this data source to access information about existing Teams in a Project or globally within an Azure DevOps organization
*
* ## Example Usage
*
* ```typescript
* 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));
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - Teams - Get](https://docs.microsoft.com/en-us/rest/api/azure/devops/core/teams/get?view=azure-devops-rest-7.0)
*
* ## PAT Permissions Required
*
* - **vso.project**: Grants the ability to read projects and teams.
*/
export declare function getTeams(args?: GetTeamsArgs, opts?: pulumi.InvokeOptions): Promise<GetTeamsResult>;
/**
* A collection of arguments for invoking getTeams.
*/
export interface GetTeamsArgs {
/**
* The Project ID. If no project ID all teams of the organization will be returned.
*/
projectId?: string;
/**
* The maximum number of teams to return. Defaults to `100`.
*/
top?: number;
}
/**
* A collection of values returned by getTeams.
*/
export interface GetTeamsResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The ID of the Project.
*/
readonly projectId?: string;
/**
* A list of `teams` blocks as documented below. A list of existing projects in your Azure DevOps Organization with details about every project which includes:
*/
readonly teams: outputs.GetTeamsTeam[];
readonly top?: number;
}
/**
* Use this data source to access information about existing Teams in a Project or globally within an Azure DevOps organization
*
* ## Example Usage
*
* ```typescript
* 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));
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - Teams - Get](https://docs.microsoft.com/en-us/rest/api/azure/devops/core/teams/get?view=azure-devops-rest-7.0)
*
* ## PAT Permissions Required
*
* - **vso.project**: Grants the ability to read projects and teams.
*/
export declare function getTeamsOutput(args?: GetTeamsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetTeamsResult>;
/**
* A collection of arguments for invoking getTeams.
*/
export interface GetTeamsOutputArgs {
/**
* The Project ID. If no project ID all teams of the organization will be returned.
*/
projectId?: pulumi.Input<string>;
/**
* The maximum number of teams to return. Defaults to `100`.
*/
top?: pulumi.Input<number>;
}