@pulumi/azuread
Version:
A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.
215 lines (214 loc) • 9.2 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages an active 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 `PrivilegedAssignmentSchedule.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 examplePrivilegedAccessGroupAssignmentSchedule = new azuread.PrivilegedAccessGroupAssignmentSchedule("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/privilegedAccessGroupAssignmentSchedule:PrivilegedAccessGroupAssignmentSchedule example 00000000-0000-0000-0000-000000000000_member_00000000-0000-0000-0000-000000000000
* ```
*/
export declare class PrivilegedAccessGroupAssignmentSchedule extends pulumi.CustomResource {
/**
* Get an existing PrivilegedAccessGroupAssignmentSchedule 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: string, id: pulumi.Input<pulumi.ID>, state?: PrivilegedAccessGroupAssignmentScheduleState, opts?: pulumi.CustomResourceOptions): PrivilegedAccessGroupAssignmentSchedule;
/**
* Returns true if the given object is an instance of PrivilegedAccessGroupAssignmentSchedule. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is PrivilegedAccessGroupAssignmentSchedule;
/**
* The type of assignment to the group. Can be either `member` or `owner`.
*/
readonly assignmentType: pulumi.Output<string>;
/**
* The duration that this assignment is valid for, formatted as an ISO8601 duration (e.g. P30D for 30 days, PT3H for three hours).
*/
readonly duration: pulumi.Output<string | undefined>;
/**
* The date that this assignment expires, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z).
*/
readonly expirationDate: pulumi.Output<string>;
/**
* The Object ID of the Azure AD group to which the principal will be assigned.
*/
readonly groupId: pulumi.Output<string>;
/**
* The justification for this assignment. May be required by the role policy.
*/
readonly justification: pulumi.Output<string | undefined>;
/**
* Is this assigment permanently valid.
*
* At least one of `expirationDate`, `duration`, or `permanentAssignment` must be supplied. The role policy may limit the maximum duration which can be supplied.
*/
readonly permanentAssignment: pulumi.Output<boolean>;
/**
* The Object ID of the principal to be assigned to the above group. Can be either a user or a group.
*/
readonly principalId: pulumi.Output<string>;
/**
* The date from which this assignment is valid, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z). If not provided, the assignment is immediately valid.
*/
readonly startDate: pulumi.Output<string>;
/**
* (String) The provisioning status of this request.
*/
readonly status: pulumi.Output<string>;
/**
* The ticket number in the ticket system approving this assignment. May be required by the role policy.
*/
readonly ticketNumber: pulumi.Output<string | undefined>;
/**
* The ticket system containing the ticket number approving this assignment. May be required by the role policy.
*/
readonly ticketSystem: pulumi.Output<string | undefined>;
/**
* Create a PrivilegedAccessGroupAssignmentSchedule resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: PrivilegedAccessGroupAssignmentScheduleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering PrivilegedAccessGroupAssignmentSchedule resources.
*/
export interface PrivilegedAccessGroupAssignmentScheduleState {
/**
* The type of assignment to the group. Can be either `member` or `owner`.
*/
assignmentType?: pulumi.Input<string>;
/**
* The duration that this assignment is valid for, formatted as an ISO8601 duration (e.g. P30D for 30 days, PT3H for three hours).
*/
duration?: pulumi.Input<string>;
/**
* The date that this assignment expires, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z).
*/
expirationDate?: pulumi.Input<string>;
/**
* The Object ID of the Azure AD group to which the principal will be assigned.
*/
groupId?: pulumi.Input<string>;
/**
* The justification for this assignment. May be required by the role policy.
*/
justification?: pulumi.Input<string>;
/**
* Is this assigment permanently valid.
*
* At least one of `expirationDate`, `duration`, or `permanentAssignment` must be supplied. The role policy may limit the maximum duration which can be supplied.
*/
permanentAssignment?: pulumi.Input<boolean>;
/**
* The Object ID of the principal to be assigned to the above group. Can be either a user or a group.
*/
principalId?: pulumi.Input<string>;
/**
* The date from which this assignment is valid, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z). If not provided, the assignment is immediately valid.
*/
startDate?: pulumi.Input<string>;
/**
* (String) The provisioning status of this request.
*/
status?: pulumi.Input<string>;
/**
* The ticket number in the ticket system approving this assignment. May be required by the role policy.
*/
ticketNumber?: pulumi.Input<string>;
/**
* The ticket system containing the ticket number approving this assignment. May be required by the role policy.
*/
ticketSystem?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a PrivilegedAccessGroupAssignmentSchedule resource.
*/
export interface PrivilegedAccessGroupAssignmentScheduleArgs {
/**
* The type of assignment to the group. Can be either `member` or `owner`.
*/
assignmentType: pulumi.Input<string>;
/**
* The duration that this assignment is valid for, formatted as an ISO8601 duration (e.g. P30D for 30 days, PT3H for three hours).
*/
duration?: pulumi.Input<string>;
/**
* The date that this assignment expires, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z).
*/
expirationDate?: pulumi.Input<string>;
/**
* The Object ID of the Azure AD group to which the principal will be assigned.
*/
groupId: pulumi.Input<string>;
/**
* The justification for this assignment. May be required by the role policy.
*/
justification?: pulumi.Input<string>;
/**
* Is this assigment permanently valid.
*
* At least one of `expirationDate`, `duration`, or `permanentAssignment` must be supplied. The role policy may limit the maximum duration which can be supplied.
*/
permanentAssignment?: pulumi.Input<boolean>;
/**
* The Object ID of the principal to be assigned to the above group. Can be either a user or a group.
*/
principalId: pulumi.Input<string>;
/**
* The date from which this assignment is valid, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z). If not provided, the assignment is immediately valid.
*/
startDate?: pulumi.Input<string>;
/**
* The ticket number in the ticket system approving this assignment. May be required by the role policy.
*/
ticketNumber?: pulumi.Input<string>;
/**
* The ticket system containing the ticket number approving this assignment. May be required by the role policy.
*/
ticketSystem?: pulumi.Input<string>;
}