UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

124 lines 4.98 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.WorkitemtrackingprocessProcessPermissions = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages permissions for an Azure DevOps Process * * ## Example Usage * * ### Permissions on an inherited process * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = new azuredevops.WorkitemtrackingprocessProcess("example", { * name: "Example Process", * parentProcessTypeId: "adcc42ab-9882-485e-a3ed-7678f01f66bc", * }); * const example_group = azuredevops.getGroup({ * name: "Example Group", * }); * const exampleWorkitemtrackingprocessProcessPermissions = new azuredevops.WorkitemtrackingprocessProcessPermissions("example", { * processId: example.id, * principal: example_group.then(example_group => example_group.id), * permissions: { * Edit: "Allow", * Delete: "Deny", * AdministerProcessPermissions: "Allow", * }, * }); * ``` * * ### Permissions on a system process * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example_group = azuredevops.getGroup({ * name: "Example Group", * }); * const example = new azuredevops.WorkitemtrackingprocessProcessPermissions("example", { * processId: "adcc42ab-9882-485e-a3ed-7678f01f66bc", * principal: example_group.then(example_group => example_group.id), * permissions: { * Create: "Deny", * }, * }); * ``` * * ## Relevant Links * * * [Azure DevOps Service REST API 7.1 - Security](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/?view=azure-devops-rest-7.1) * * ## PAT Permissions Required * * - **Security**: Manage * - **Identity**: Read * * ## Import * * The resource does not support import. */ class WorkitemtrackingprocessProcessPermissions extends pulumi.CustomResource { /** * Get an existing WorkitemtrackingprocessProcessPermissions 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 WorkitemtrackingprocessProcessPermissions(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of WorkitemtrackingprocessProcessPermissions. 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'] === WorkitemtrackingprocessProcessPermissions.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["permissions"] = state?.permissions; resourceInputs["principal"] = state?.principal; resourceInputs["processId"] = state?.processId; resourceInputs["replace"] = state?.replace; } else { const args = argsOrState; if (args?.permissions === undefined && !opts.urn) { throw new Error("Missing required property 'permissions'"); } if (args?.principal === undefined && !opts.urn) { throw new Error("Missing required property 'principal'"); } if (args?.processId === undefined && !opts.urn) { throw new Error("Missing required property 'processId'"); } resourceInputs["permissions"] = args?.permissions; resourceInputs["principal"] = args?.principal; resourceInputs["processId"] = args?.processId; resourceInputs["replace"] = args?.replace; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(WorkitemtrackingprocessProcessPermissions.__pulumiType, name, resourceInputs, opts); } } exports.WorkitemtrackingprocessProcessPermissions = WorkitemtrackingprocessProcessPermissions; /** @internal */ WorkitemtrackingprocessProcessPermissions.__pulumiType = 'azuredevops:index/workitemtrackingprocessProcessPermissions:WorkitemtrackingprocessProcessPermissions'; //# sourceMappingURL=workitemtrackingprocessProcessPermissions.js.map