UNPKG

@pulumi/azuread

Version:

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

173 lines (172 loc) 8.49 kB
import * as pulumi from "@pulumi/pulumi"; /** * ## Example Usage * * *Basic example* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = new azuread.Application("example", {displayName: "example"}); * const exampleServicePrincipal = new azuread.ServicePrincipal("example", {clientId: example.clientId}); * const exampleServicePrincipalPassword = new azuread.ServicePrincipalPassword("example", {servicePrincipalId: exampleServicePrincipal.id}); * ``` * * *Time-based rotation* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * import * as time from "@pulumiverse/time"; * * const example = new azuread.Application("example", {displayName: "example"}); * const exampleServicePrincipal = new azuread.ServicePrincipal("example", {clientId: example.clientId}); * const exampleRotating = new time.Rotating("example", {rotationDays: 7}); * const exampleServicePrincipalPassword = new azuread.ServicePrincipalPassword("example", { * servicePrincipalId: exampleServicePrincipal.id, * rotateWhenChanged: { * rotation: exampleRotating.id, * }, * }); * ``` * * ## Import * * This resource does not support importing. */ export declare class ServicePrincipalPassword extends pulumi.CustomResource { /** * Get an existing ServicePrincipalPassword 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?: ServicePrincipalPasswordState, opts?: pulumi.CustomResourceOptions): ServicePrincipalPassword; /** * Returns true if the given object is an instance of ServicePrincipalPassword. 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 ServicePrincipalPassword; /** * A display name for the password. */ readonly displayName: pulumi.Output<string>; /** * The end date until which the password is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). Changing this field forces a new resource to be created. */ readonly endDate: pulumi.Output<string>; /** * A relative duration for which the password is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created. * * @deprecated The `endDateRelative` property is deprecated and will be removed in a future version of the AzureAD provider. Please instead use the Terraform `timeadd()` function to calculate a value for the `endDate` property. */ readonly endDateRelative: pulumi.Output<string | undefined>; /** * A UUID used to uniquely identify this password credential. */ readonly keyId: pulumi.Output<string>; /** * A map of arbitrary key/value pairs that will force recreation of the password when they change, enabling password rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created. */ readonly rotateWhenChanged: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The ID of the service principal for which this password should be created. Changing this field forces a new resource to be created. */ readonly servicePrincipalId: pulumi.Output<string>; /** * The start date from which the password is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the current date is used. Changing this field forces a new resource to be created. */ readonly startDate: pulumi.Output<string>; /** * The password for this service principal, which is generated by Azure Active Directory. */ readonly value: pulumi.Output<string>; /** * Create a ServicePrincipalPassword 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: ServicePrincipalPasswordArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServicePrincipalPassword resources. */ export interface ServicePrincipalPasswordState { /** * A display name for the password. */ displayName?: pulumi.Input<string>; /** * The end date until which the password is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). Changing this field forces a new resource to be created. */ endDate?: pulumi.Input<string>; /** * A relative duration for which the password is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created. * * @deprecated The `endDateRelative` property is deprecated and will be removed in a future version of the AzureAD provider. Please instead use the Terraform `timeadd()` function to calculate a value for the `endDate` property. */ endDateRelative?: pulumi.Input<string>; /** * A UUID used to uniquely identify this password credential. */ keyId?: pulumi.Input<string>; /** * A map of arbitrary key/value pairs that will force recreation of the password when they change, enabling password rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created. */ rotateWhenChanged?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The ID of the service principal for which this password should be created. Changing this field forces a new resource to be created. */ servicePrincipalId?: pulumi.Input<string>; /** * The start date from which the password is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the current date is used. Changing this field forces a new resource to be created. */ startDate?: pulumi.Input<string>; /** * The password for this service principal, which is generated by Azure Active Directory. */ value?: pulumi.Input<string>; } /** * The set of arguments for constructing a ServicePrincipalPassword resource. */ export interface ServicePrincipalPasswordArgs { /** * A display name for the password. */ displayName?: pulumi.Input<string>; /** * The end date until which the password is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). Changing this field forces a new resource to be created. */ endDate?: pulumi.Input<string>; /** * A relative duration for which the password is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created. * * @deprecated The `endDateRelative` property is deprecated and will be removed in a future version of the AzureAD provider. Please instead use the Terraform `timeadd()` function to calculate a value for the `endDate` property. */ endDateRelative?: pulumi.Input<string>; /** * A map of arbitrary key/value pairs that will force recreation of the password when they change, enabling password rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created. */ rotateWhenChanged?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The ID of the service principal for which this password should be created. Changing this field forces a new resource to be created. */ servicePrincipalId: pulumi.Input<string>; /** * The start date from which the password is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the current date is used. Changing this field forces a new resource to be created. */ startDate?: pulumi.Input<string>; }