@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
193 lines (192 loc) • 7.11 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* ## *---
*
* layout: "azuredevops"
* page_title: "AzureDevops: azuredevops.Team"
* description: |-
* Manages a team within a project in a Azure DevOps organization.
* ---
*
* # azuredevops.Team
*
* Manages a team within a project in a Azure DevOps organization.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.Project("example", {
* name: "Example Project",
* workItemTemplate: "Agile",
* versionControl: "Git",
* visibility: "private",
* description: "Managed by Pulumi",
* });
* const example_project_contributors = azuredevops.getGroupOutput({
* projectId: example.id,
* name: "Contributors",
* });
* const example_project_readers = azuredevops.getGroupOutput({
* projectId: example.id,
* name: "Readers",
* });
* const exampleTeam = new azuredevops.Team("example", {
* projectId: example.id,
* name: "Example Team",
* administrators: [example_project_contributors.apply(example_project_contributors => example_project_contributors.descriptor)],
* members: [example_project_readers.apply(example_project_readers => example_project_readers.descriptor)],
* });
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - Teams - Create](https://docs.microsoft.com/en-us/rest/api/azure/devops/core/teams/create?view=azure-devops-rest-7.0)
*
* ## PAT Permissions Required
*
* - **vso.project_manage**: Grants the ability to create, read, update, and delete projects and teams.
*
* ## Import
*
* Azure DevOps teams can be imported using the complete resource id `<project_id>/<team_id>` e.g.
*
* ```sh
* $ pulumi import azuredevops:index/team:Team example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
* ```
*/
export declare class Team extends pulumi.CustomResource {
/**
* Get an existing Team resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TeamState, opts?: pulumi.CustomResourceOptions): Team;
/**
* Returns true if the given object is an instance of Team. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Team;
/**
* List of subject descriptors to define administrators of the team.
*
* > **NOTE:** It's possible to define team administrators both within the
* `azuredevops.Team` resource via the `administrators` block and by using the
* `azuredevops.TeamAdministrators` resource. However it's not possible to use
* both methods to manage team administrators, since there'll be conflicts.
*/
readonly administrators: pulumi.Output<string[]>;
/**
* The description of the Team.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The descriptor of the Team.
*/
readonly descriptor: pulumi.Output<string>;
/**
* List of subject descriptors to define members of the team.
*
* > **NOTE:** It's possible to define team members both within the
* `azuredevops.Team` resource via the `members` block and by using the
* `azuredevops.TeamMembers` resource. However it's not possible to use
* both methods to manage team members, since there'll be conflicts.
*/
readonly members: pulumi.Output<string[]>;
/**
* The name of the Team.
*/
readonly name: pulumi.Output<string>;
/**
* The Project ID.
*/
readonly projectId: pulumi.Output<string>;
/**
* Create a Team resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: TeamArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Team resources.
*/
export interface TeamState {
/**
* List of subject descriptors to define administrators of the team.
*
* > **NOTE:** It's possible to define team administrators both within the
* `azuredevops.Team` resource via the `administrators` block and by using the
* `azuredevops.TeamAdministrators` resource. However it's not possible to use
* both methods to manage team administrators, since there'll be conflicts.
*/
administrators?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The description of the Team.
*/
description?: pulumi.Input<string>;
/**
* The descriptor of the Team.
*/
descriptor?: pulumi.Input<string>;
/**
* List of subject descriptors to define members of the team.
*
* > **NOTE:** It's possible to define team members both within the
* `azuredevops.Team` resource via the `members` block and by using the
* `azuredevops.TeamMembers` resource. However it's not possible to use
* both methods to manage team members, since there'll be conflicts.
*/
members?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The name of the Team.
*/
name?: pulumi.Input<string>;
/**
* The Project ID.
*/
projectId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Team resource.
*/
export interface TeamArgs {
/**
* List of subject descriptors to define administrators of the team.
*
* > **NOTE:** It's possible to define team administrators both within the
* `azuredevops.Team` resource via the `administrators` block and by using the
* `azuredevops.TeamAdministrators` resource. However it's not possible to use
* both methods to manage team administrators, since there'll be conflicts.
*/
administrators?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The description of the Team.
*/
description?: pulumi.Input<string>;
/**
* List of subject descriptors to define members of the team.
*
* > **NOTE:** It's possible to define team members both within the
* `azuredevops.Team` resource via the `members` block and by using the
* `azuredevops.TeamMembers` resource. However it's not possible to use
* both methods to manage team members, since there'll be conflicts.
*/
members?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The name of the Team.
*/
name?: pulumi.Input<string>;
/**
* The Project ID.
*/
projectId: pulumi.Input<string>;
}