UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

118 lines 4.8 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Group = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * 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 * ``` */ 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, id, state, opts) { return new Group(name, state, { ...opts, id: id }); } /** * 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) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Group.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state?.description; resourceInputs["descriptor"] = state?.descriptor; resourceInputs["displayName"] = state?.displayName; resourceInputs["domain"] = state?.domain; resourceInputs["groupId"] = state?.groupId; resourceInputs["mail"] = state?.mail; resourceInputs["members"] = state?.members; resourceInputs["origin"] = state?.origin; resourceInputs["originId"] = state?.originId; resourceInputs["principalName"] = state?.principalName; resourceInputs["scope"] = state?.scope; resourceInputs["subjectKind"] = state?.subjectKind; resourceInputs["url"] = state?.url; } else { const args = argsOrState; resourceInputs["description"] = args?.description; resourceInputs["displayName"] = args?.displayName; resourceInputs["mail"] = args?.mail; resourceInputs["members"] = args?.members; resourceInputs["originId"] = args?.originId; resourceInputs["scope"] = args?.scope; resourceInputs["descriptor"] = undefined /*out*/; resourceInputs["domain"] = undefined /*out*/; resourceInputs["groupId"] = undefined /*out*/; resourceInputs["origin"] = undefined /*out*/; resourceInputs["principalName"] = undefined /*out*/; resourceInputs["subjectKind"] = undefined /*out*/; resourceInputs["url"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Group.__pulumiType, name, resourceInputs, opts); } } exports.Group = Group; /** @internal */ Group.__pulumiType = 'azuredevops:index/group:Group'; //# sourceMappingURL=group.js.map