@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
102 lines • 4.55 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.GroupEntitlement = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages a group entitlement within Azure DevOps.
*
* ## Example Usage
*
* ### With an Azure DevOps local group managed by this resource
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.GroupEntitlement("example", {displayName: "Group Name"});
* ```
*
* ### With group origin ID
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.GroupEntitlement("example", {
* origin: "aad",
* originId: "00000000-0000-0000-0000-000000000000",
* });
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - Group Entitlements](https://learn.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/group-entitlements?view=azure-devops-rest-7.1)
* - [Programmatic mapping of access levels](https://docs.microsoft.com/en-us/azure/devops/organizations/security/access-levels?view=azure-devops#programmatic-mapping-of-access-levels)
*
* ## PAT Permissions Required
*
* - **Member Entitlement Management**: Read & Write
*
* ## Import
*
* The resource allows the import via the ID of a group entitlement, which is a UUID.
*
* ```sh
* $ pulumi import azuredevops:index/groupEntitlement:GroupEntitlement example 00000000-0000-0000-0000-000000000000
* ```
*/
class GroupEntitlement extends pulumi.CustomResource {
/**
* Get an existing GroupEntitlement 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 GroupEntitlement(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of GroupEntitlement. 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'] === GroupEntitlement.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accountLicenseType"] = state ? state.accountLicenseType : undefined;
resourceInputs["descriptor"] = state ? state.descriptor : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["licensingSource"] = state ? state.licensingSource : undefined;
resourceInputs["origin"] = state ? state.origin : undefined;
resourceInputs["originId"] = state ? state.originId : undefined;
resourceInputs["principalName"] = state ? state.principalName : undefined;
}
else {
const args = argsOrState;
resourceInputs["accountLicenseType"] = args ? args.accountLicenseType : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["licensingSource"] = args ? args.licensingSource : undefined;
resourceInputs["origin"] = args ? args.origin : undefined;
resourceInputs["originId"] = args ? args.originId : undefined;
resourceInputs["descriptor"] = undefined /*out*/;
resourceInputs["principalName"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(GroupEntitlement.__pulumiType, name, resourceInputs, opts);
}
}
exports.GroupEntitlement = GroupEntitlement;
/** @internal */
GroupEntitlement.__pulumiType = 'azuredevops:index/groupEntitlement:GroupEntitlement';
//# sourceMappingURL=groupEntitlement.js.map