UNPKG

@pulumi/azuread

Version:

A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.

122 lines 6.17 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.PrivilegedAccessGroupEligibilitySchedule = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages an eligible assignment to a privileged access group. * * ## API Permissions * * The following API permissions are required in order to use this resource. * * When authenticated with a service principal, this resource requires the `PrivilegedEligibilitySchedule.ReadWrite.AzureADGroup` Microsoft Graph API permissions. * * When authenticated with a user principal, this resource requires `Global Administrator` directory role, or the `Privileged Role Administrator` role in Identity Governance. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = new azuread.Group("example", { * displayName: "group-name", * securityEnabled: true, * }); * const member = new azuread.User("member", { * userPrincipalName: "jdoe@example.com", * displayName: "J. Doe", * mailNickname: "jdoe", * password: "SecretP@sswd99!", * }); * const examplePrivilegedAccessGroupEligibilitySchedule = new azuread.PrivilegedAccessGroupEligibilitySchedule("example", { * groupId: pim.id, * principalId: member.id, * assignmentType: "member", * duration: "P30D", * justification: "as requested", * }); * ``` * * ## Import * * An assignment schedule can be imported using the schedule ID, e.g. * * ```sh * $ pulumi import azuread:index/privilegedAccessGroupEligibilitySchedule:PrivilegedAccessGroupEligibilitySchedule example 00000000-0000-0000-0000-000000000000_member_00000000-0000-0000-0000-000000000000 * ``` */ class PrivilegedAccessGroupEligibilitySchedule extends pulumi.CustomResource { /** * Get an existing PrivilegedAccessGroupEligibilitySchedule 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 PrivilegedAccessGroupEligibilitySchedule(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PrivilegedAccessGroupEligibilitySchedule. 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'] === PrivilegedAccessGroupEligibilitySchedule.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["assignmentType"] = state ? state.assignmentType : undefined; resourceInputs["duration"] = state ? state.duration : undefined; resourceInputs["expirationDate"] = state ? state.expirationDate : undefined; resourceInputs["groupId"] = state ? state.groupId : undefined; resourceInputs["justification"] = state ? state.justification : undefined; resourceInputs["permanentAssignment"] = state ? state.permanentAssignment : undefined; resourceInputs["principalId"] = state ? state.principalId : undefined; resourceInputs["startDate"] = state ? state.startDate : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["ticketNumber"] = state ? state.ticketNumber : undefined; resourceInputs["ticketSystem"] = state ? state.ticketSystem : undefined; } else { const args = argsOrState; if ((!args || args.assignmentType === undefined) && !opts.urn) { throw new Error("Missing required property 'assignmentType'"); } if ((!args || args.groupId === undefined) && !opts.urn) { throw new Error("Missing required property 'groupId'"); } if ((!args || args.principalId === undefined) && !opts.urn) { throw new Error("Missing required property 'principalId'"); } resourceInputs["assignmentType"] = args ? args.assignmentType : undefined; resourceInputs["duration"] = args ? args.duration : undefined; resourceInputs["expirationDate"] = args ? args.expirationDate : undefined; resourceInputs["groupId"] = args ? args.groupId : undefined; resourceInputs["justification"] = args ? args.justification : undefined; resourceInputs["permanentAssignment"] = args ? args.permanentAssignment : undefined; resourceInputs["principalId"] = args ? args.principalId : undefined; resourceInputs["startDate"] = args ? args.startDate : undefined; resourceInputs["ticketNumber"] = args ? args.ticketNumber : undefined; resourceInputs["ticketSystem"] = args ? args.ticketSystem : undefined; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PrivilegedAccessGroupEligibilitySchedule.__pulumiType, name, resourceInputs, opts); } } exports.PrivilegedAccessGroupEligibilitySchedule = PrivilegedAccessGroupEligibilitySchedule; /** @internal */ PrivilegedAccessGroupEligibilitySchedule.__pulumiType = 'azuread:index/privilegedAccessGroupEligibilitySchedule:PrivilegedAccessGroupEligibilitySchedule'; //# sourceMappingURL=privilegedAccessGroupEligibilitySchedule.js.map