@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
84 lines • 3.93 kB
JavaScript
;
// *** 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.ServicePrincipalEntitlement = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages a Service Principal Entitlement.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.ServicePrincipalEntitlement("example", {originId: "00000000-0000-0000-0000-000000000000"});
* ```
*
* ## Import
*
* Service Principal Entitlements can be imported using the `resource id`.
*
* The `resource id` can be found using DEV Tools in the `Users` section of the ADO organization.
*
* ```sh
* $ pulumi import azuredevops:index/servicePrincipalEntitlement:ServicePrincipalEntitlement example 8480c6eb-ce60-47e9-88df-eca3c801638b
* ```
*/
class ServicePrincipalEntitlement extends pulumi.CustomResource {
/**
* Get an existing ServicePrincipalEntitlement 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 ServicePrincipalEntitlement(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ServicePrincipalEntitlement. 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'] === ServicePrincipalEntitlement.__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;
}
else {
const args = argsOrState;
if ((!args || args.originId === undefined) && !opts.urn) {
throw new Error("Missing required property 'originId'");
}
resourceInputs["accountLicenseType"] = args ? args.accountLicenseType : undefined;
resourceInputs["licensingSource"] = args ? args.licensingSource : undefined;
resourceInputs["origin"] = args ? args.origin : undefined;
resourceInputs["originId"] = args ? args.originId : undefined;
resourceInputs["descriptor"] = undefined /*out*/;
resourceInputs["displayName"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServicePrincipalEntitlement.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServicePrincipalEntitlement = ServicePrincipalEntitlement;
/** @internal */
ServicePrincipalEntitlement.__pulumiType = 'azuredevops:index/servicePrincipalEntitlement:ServicePrincipalEntitlement';
//# sourceMappingURL=servicePrincipalEntitlement.js.map