UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

153 lines (152 loc) 6.1 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages members of 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_readers = azuredevops.getGroupOutput({ * projectId: example.id, * name: "Readers", * }); * const exampleTeam = new azuredevops.Team("example", { * projectId: example.id, * name: pulumi.interpolate`${example.name} Team 2`, * }); * const example_team_members = new azuredevops.TeamMembers("example-team-members", { * projectId: exampleTeam.projectId, * teamId: exampleTeam.id, * mode: "overwrite", * members: [example_project_readers.apply(example_project_readers => example_project_readers.descriptor)], * }); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.0 - Teams - Update](https://docs.microsoft.com/en-us/rest/api/azure/devops/core/teams/update?view=azure-devops-rest-7.0) * * ## PAT Permissions Required * * - **vso.project_write**: Grants the ability to read and update projects and teams. * * ## Import * * The resource does not support import. */ export declare class TeamMembers extends pulumi.CustomResource { /** * Get an existing TeamMembers 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?: TeamMembersState, opts?: pulumi.CustomResourceOptions): TeamMembers; /** * Returns true if the given object is an instance of TeamMembers. 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 TeamMembers; /** * 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 mode how the resource manages team members. Possible values: `add`, `overwrite`. Defaults to `add`. * * > **NOTE:** 1. `mode = add`: the resource will ensure that all specified members will be part of the referenced team * <br>2. `mode = overwrite`: the resource will replace all existing members with the members specified within the `members` block */ readonly mode: pulumi.Output<string | undefined>; /** * The Project ID. */ readonly projectId: pulumi.Output<string>; /** * The ID of the Team. */ readonly teamId: pulumi.Output<string>; /** * Create a TeamMembers 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: TeamMembersArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TeamMembers resources. */ export interface TeamMembersState { /** * 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 mode how the resource manages team members. Possible values: `add`, `overwrite`. Defaults to `add`. * * > **NOTE:** 1. `mode = add`: the resource will ensure that all specified members will be part of the referenced team * <br>2. `mode = overwrite`: the resource will replace all existing members with the members specified within the `members` block */ mode?: pulumi.Input<string>; /** * The Project ID. */ projectId?: pulumi.Input<string>; /** * The ID of the Team. */ teamId?: pulumi.Input<string>; } /** * The set of arguments for constructing a TeamMembers resource. */ export interface TeamMembersArgs { /** * 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 mode how the resource manages team members. Possible values: `add`, `overwrite`. Defaults to `add`. * * > **NOTE:** 1. `mode = add`: the resource will ensure that all specified members will be part of the referenced team * <br>2. `mode = overwrite`: the resource will replace all existing members with the members specified within the `members` block */ mode?: pulumi.Input<string>; /** * The Project ID. */ projectId: pulumi.Input<string>; /** * The ID of the Team. */ teamId: pulumi.Input<string>; }