UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

163 lines (162 loc) 6.73 kB
import * as pulumi from "@pulumi/pulumi"; /** * ## *--- * * layout: "azuredevops" * page_title: "AzureDevops: azuredevops.TeamAdministrators" * description: |- * Manages administrators of a team within a project in a Azure DevOps organization. * --- * * # azuredevops.TeamAdministrators * * Manages administrators 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_contributors = azuredevops.getGroupOutput({ * projectId: example.id, * name: "Contributors", * }); * const exampleTeam = new azuredevops.Team("example", { * projectId: example.id, * name: pulumi.interpolate`${example.name} Team 2`, * }); * const example_team_administrators = new azuredevops.TeamAdministrators("example-team-administrators", { * projectId: exampleTeam.projectId, * teamId: exampleTeam.id, * mode: "overwrite", * administrators: [example_project_contributors.apply(example_project_contributors => example_project_contributors.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 TeamAdministrators extends pulumi.CustomResource { /** * Get an existing TeamAdministrators 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?: TeamAdministratorsState, opts?: pulumi.CustomResourceOptions): TeamAdministrators; /** * Returns true if the given object is an instance of TeamAdministrators. 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 TeamAdministrators; /** * 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 mode how the resource manages team administrators. Possible values: `add`, `overwrite`. Defaults to `add`. * * > **NOTE:** 1. `mode = add`: the resource will ensure that all specified administrators will be part of the referenced team * <br> 2. `mode = overwrite`: the resource will replace all existing administrators with the administrators specified within the `administrators` 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 TeamAdministrators 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: TeamAdministratorsArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TeamAdministrators resources. */ export interface TeamAdministratorsState { /** * 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 mode how the resource manages team administrators. Possible values: `add`, `overwrite`. Defaults to `add`. * * > **NOTE:** 1. `mode = add`: the resource will ensure that all specified administrators will be part of the referenced team * <br> 2. `mode = overwrite`: the resource will replace all existing administrators with the administrators specified within the `administrators` 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 TeamAdministrators resource. */ export interface TeamAdministratorsArgs { /** * 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 mode how the resource manages team administrators. Possible values: `add`, `overwrite`. Defaults to `add`. * * > **NOTE:** 1. `mode = add`: the resource will ensure that all specified administrators will be part of the referenced team * <br> 2. `mode = overwrite`: the resource will replace all existing administrators with the administrators specified within the `administrators` block */ mode?: pulumi.Input<string>; /** * The Project ID. */ projectId: pulumi.Input<string>; /** * The ID of the Team. */ teamId: pulumi.Input<string>; }