UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

216 lines (215 loc) 9.21 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a group within Azure DevOps. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = new azuredevops.Project("example", {name: "Example Project"}); * const example_readers = azuredevops.getGroupOutput({ * projectId: example.id, * name: "Readers", * }); * const example_contributors = azuredevops.getGroupOutput({ * projectId: example.id, * name: "Contributors", * }); * const exampleGroup = new azuredevops.Group("example", { * scope: example.id, * displayName: "Example group", * description: "Example description", * members: [ * example_readers.apply(example_readers => example_readers.descriptor), * example_contributors.apply(example_contributors => example_contributors.descriptor), * ], * }); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.0 - Groups](https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/groups?view=azure-devops-rest-7.0) * * ## PAT Permissions Required * * - **Project & Team**: Read, Write, & Manage * * ## Import * * Azure DevOps groups can be imported using the group identity descriptor, e.g. * * ```sh * $ pulumi import azuredevops:index/group:Group example aadgp.Uy0xLTktMTU1MTM3NDI0NS0xMjA0NDAwOTY5LTI0MDI5ODY0MTMtMjE3OTQwODYxNi0zLTIxNjc2NjQyNTMtMzI1Nzg0NDI4OS0yMjU4MjcwOTc0LTI2MDYxODY2NDU * ``` */ export declare class Group extends pulumi.CustomResource { /** * Get an existing Group 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?: GroupState, opts?: pulumi.CustomResourceOptions): Group; /** * Returns true if the given object is an instance of Group. 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 Group; /** * The Description of the Project. */ readonly description: pulumi.Output<string | undefined>; /** * The identity (subject) descriptor of the Group. */ readonly descriptor: pulumi.Output<string>; /** * The name of a new Azure DevOps group that is not backed by an external provider. The `originId` and `mail` arguments cannot be used simultaneously with `displayName`. */ readonly displayName: pulumi.Output<string>; /** * This represents the name of the container of origin for a graph member. */ readonly domain: pulumi.Output<string>; /** * The ID of the Group. */ readonly groupId: pulumi.Output<string>; /** * The mail address as a reference to an existing group from an external AD or AAD backed provider. The `scope`, `originId` and `displayName` arguments cannot be used simultaneously with `mail`. */ readonly mail: pulumi.Output<string>; /** * The member of the Group. * * > **NOTE:** It's possible to define group members both within the `azuredevops.Group` resource via the members block and by using the `azuredevops.GroupMembership` resource. However it's not possible to use both methods to manage group members, since there'll be conflicts. */ readonly members: pulumi.Output<string[]>; /** * The type of source provider for the origin identifier (ex:AD, AAD, MSA) */ readonly origin: pulumi.Output<string>; /** * The OriginID as a reference to a group from an external AD or AAD backed provider. The `scope`, `mail` and `displayName` arguments cannot be used simultaneously with `originId`. */ readonly originId: pulumi.Output<string>; /** * This is the PrincipalName of this graph member from the source provider. */ readonly principalName: pulumi.Output<string>; /** * The scope of the group. A descriptor referencing the scope (collection, project) in which the group should be created. If omitted, will be created in the scope of the enclosing account or organization.x */ readonly scope: pulumi.Output<string | undefined>; /** * This field identifies the type of the graph subject (ex: Group, Scope, User). */ readonly subjectKind: pulumi.Output<string>; /** * This url is the full route to the source resource of this graph subject. */ readonly url: pulumi.Output<string>; /** * Create a Group 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?: GroupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Group resources. */ export interface GroupState { /** * The Description of the Project. */ description?: pulumi.Input<string>; /** * The identity (subject) descriptor of the Group. */ descriptor?: pulumi.Input<string>; /** * The name of a new Azure DevOps group that is not backed by an external provider. The `originId` and `mail` arguments cannot be used simultaneously with `displayName`. */ displayName?: pulumi.Input<string>; /** * This represents the name of the container of origin for a graph member. */ domain?: pulumi.Input<string>; /** * The ID of the Group. */ groupId?: pulumi.Input<string>; /** * The mail address as a reference to an existing group from an external AD or AAD backed provider. The `scope`, `originId` and `displayName` arguments cannot be used simultaneously with `mail`. */ mail?: pulumi.Input<string>; /** * The member of the Group. * * > **NOTE:** It's possible to define group members both within the `azuredevops.Group` resource via the members block and by using the `azuredevops.GroupMembership` resource. However it's not possible to use both methods to manage group members, since there'll be conflicts. */ members?: pulumi.Input<pulumi.Input<string>[]>; /** * The type of source provider for the origin identifier (ex:AD, AAD, MSA) */ origin?: pulumi.Input<string>; /** * The OriginID as a reference to a group from an external AD or AAD backed provider. The `scope`, `mail` and `displayName` arguments cannot be used simultaneously with `originId`. */ originId?: pulumi.Input<string>; /** * This is the PrincipalName of this graph member from the source provider. */ principalName?: pulumi.Input<string>; /** * The scope of the group. A descriptor referencing the scope (collection, project) in which the group should be created. If omitted, will be created in the scope of the enclosing account or organization.x */ scope?: pulumi.Input<string>; /** * This field identifies the type of the graph subject (ex: Group, Scope, User). */ subjectKind?: pulumi.Input<string>; /** * This url is the full route to the source resource of this graph subject. */ url?: pulumi.Input<string>; } /** * The set of arguments for constructing a Group resource. */ export interface GroupArgs { /** * The Description of the Project. */ description?: pulumi.Input<string>; /** * The name of a new Azure DevOps group that is not backed by an external provider. The `originId` and `mail` arguments cannot be used simultaneously with `displayName`. */ displayName?: pulumi.Input<string>; /** * The mail address as a reference to an existing group from an external AD or AAD backed provider. The `scope`, `originId` and `displayName` arguments cannot be used simultaneously with `mail`. */ mail?: pulumi.Input<string>; /** * The member of the Group. * * > **NOTE:** It's possible to define group members both within the `azuredevops.Group` resource via the members block and by using the `azuredevops.GroupMembership` resource. However it's not possible to use both methods to manage group members, since there'll be conflicts. */ members?: pulumi.Input<pulumi.Input<string>[]>; /** * The OriginID as a reference to a group from an external AD or AAD backed provider. The `scope`, `mail` and `displayName` arguments cannot be used simultaneously with `originId`. */ originId?: pulumi.Input<string>; /** * The scope of the group. A descriptor referencing the scope (collection, project) in which the group should be created. If omitted, will be created in the scope of the enclosing account or organization.x */ scope?: pulumi.Input<string>; }