UNPKG

pulumi-fusionauth

Version:

A Pulumi package for managing FusionAuth instances.

401 lines (400 loc) 18.8 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * ## # User Resource * * [Users API](https://fusionauth.io/docs/v1/tech/apis/users) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fusionauth from "pulumi-fusionauth"; * * const example = new fusionauth.FusionAuthUser("example", { * userId: "4c4511df-0d0d-4029-8c2b-f6c01b9e138d", * birthDate: "1976-05-30", * data: JSON.stringify({ * displayName: "Johnny Boy", * favoriteColors: [ * "Red", * "Blue", * ], * }), * email: "example@fusionauth.io", * encryptionScheme: "salted-sha256", * expiry: 1571786483322, * firstName: "John", * fullName: "John Doe", * imageUrl: "http://65.media.tumblr.com/tumblr_l7dbl0MHbU1qz50x3o1_500.png", * lastName: "Doe", * middleName: "William", * mobilePhone: "303-555-1234", * passwordChangeRequired: false, * preferredLanguages: [ * "en", * "fr", * ], * timezone: "America/Denver", * usernameStatus: "ACTIVE", * username: "johnny123", * }); * ``` */ export declare class FusionAuthUser extends pulumi.CustomResource { /** * Get an existing FusionAuthUser 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?: FusionAuthUserState, opts?: pulumi.CustomResourceOptions): FusionAuthUser; /** * Returns true if the given object is an instance of FusionAuthUser. 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 FusionAuthUser; /** * An optional Application Id. When this value is provided, it will be used to resolve an application specific email template if you have configured transactional emails such as setup password, email verification and others. */ readonly applicationId: pulumi.Output<string | undefined>; /** * An ISO-8601 formatted date of the User’s birthdate such as YYYY-MM-DD. */ readonly birthDate: pulumi.Output<string | undefined>; /** * An object that can hold any information about a User that should be persisted. Must be a JSON serialised string. */ readonly data: pulumi.Output<string | undefined>; /** * A tenant has the option to configure one or more email domains to be blocked in order to restrict email domains during user create or update. Setting this property equal to true will override the tenant configuration. See `registration_configuration.blocked_domains` in the Tenant resource. */ readonly disableDomainBlock: pulumi.Output<boolean | undefined>; /** * The User’s email address. An email address is a unique in FusionAuth and stored in lower case. */ readonly email: pulumi.Output<string | undefined>; /** * The method for encrypting the User’s password. */ readonly encryptionScheme: pulumi.Output<string | undefined>; /** * The expiration instant of the User’s account. An expired user is not permitted to login. */ readonly expiry: pulumi.Output<number | undefined>; /** * The factor used by the password encryption scheme. If not provided, the PasswordEncryptor provides a default value. * Generally this will be used as an iteration count to generate the hash. The actual use of this value is up to the * PasswordEncryptor implementation. */ readonly factor: pulumi.Output<number>; /** * The first name of the User. */ readonly firstName: pulumi.Output<string | undefined>; /** * The User’s full name as a separate field that is not calculated from firstName and lastName. */ readonly fullName: pulumi.Output<string | undefined>; /** * The URL that points to an image file that is the User’s profile image. */ readonly imageUrl: pulumi.Output<string | undefined>; /** * The User’s last name. */ readonly lastName: pulumi.Output<string | undefined>; /** * The User’s middle name. */ readonly middleName: pulumi.Output<string | undefined>; /** * The User’s mobile phone number. This is useful is you will be sending push notifications or SMS messages to the User. */ readonly mobilePhone: pulumi.Output<string | undefined>; /** * The email address of the user’s parent or guardian. This field is used to allow a child user to identify their parent so FusionAuth can make a request to the parent to confirm the parent relationship. */ readonly parentEmail: pulumi.Output<string | undefined>; /** * The User’s plaintext password. This password will be hashed and the provided value will never be stored and cannot be retrieved. */ readonly password: pulumi.Output<string | undefined>; /** * Indicates that the User’s password needs to be changed during their next login attempt. */ readonly passwordChangeRequired: pulumi.Output<boolean | undefined>; /** * An array of locale strings that give, in order, the User’s preferred languages. These are important for email templates and other localizable text. */ readonly preferredLanguages: pulumi.Output<string[] | undefined>; /** * Indicates to FusionAuth to send the User an email asking them to set their password. The Email Template that is used is configured in the System Configuration setting for Set Password Email Template. */ readonly sendSetPasswordEmail: pulumi.Output<boolean | undefined>; /** * Indicates to FusionAuth that it should skip email verification even if it is enabled. This is useful for creating admin or internal User accounts. */ readonly skipVerification: pulumi.Output<boolean | undefined>; /** * The unique Id of the tenant used to scope this API request. */ readonly tenantId: pulumi.Output<string | undefined>; /** * The User’s preferred timezone. The string must be in an IANA time zone format. */ readonly timezone: pulumi.Output<string | undefined>; readonly twoFactorMethods: pulumi.Output<outputs.FusionAuthUserTwoFactorMethod[]>; /** * A list of recovery codes. These may be used in place of a code provided by an MFA factor. They are single use. If a recovery code is used in a disable request, all MFA methods are removed. If, after that, a Multi-Factor method is added, a new set of recovery codes will be generated. */ readonly twoFactorRecoveryCodes: pulumi.Output<string[]>; /** * The Id to use for the new User. If not specified a secure random UUID will be generated.. */ readonly userId: pulumi.Output<string>; /** * The username of the User. The username is stored and returned as a case sensitive value, however a username is considered unique regardless of the case. bob is considered equal to BoB so either version of this username can be used whenever providing it as input to an API. */ readonly username: pulumi.Output<string | undefined>; /** * The current status of the username. This is used if you are moderating usernames via CleanSpeak. */ readonly usernameStatus: pulumi.Output<string | undefined>; /** * Create a FusionAuthUser 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?: FusionAuthUserArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering FusionAuthUser resources. */ export interface FusionAuthUserState { /** * An optional Application Id. When this value is provided, it will be used to resolve an application specific email template if you have configured transactional emails such as setup password, email verification and others. */ applicationId?: pulumi.Input<string>; /** * An ISO-8601 formatted date of the User’s birthdate such as YYYY-MM-DD. */ birthDate?: pulumi.Input<string>; /** * An object that can hold any information about a User that should be persisted. Must be a JSON serialised string. */ data?: pulumi.Input<string>; /** * A tenant has the option to configure one or more email domains to be blocked in order to restrict email domains during user create or update. Setting this property equal to true will override the tenant configuration. See `registration_configuration.blocked_domains` in the Tenant resource. */ disableDomainBlock?: pulumi.Input<boolean>; /** * The User’s email address. An email address is a unique in FusionAuth and stored in lower case. */ email?: pulumi.Input<string>; /** * The method for encrypting the User’s password. */ encryptionScheme?: pulumi.Input<string>; /** * The expiration instant of the User’s account. An expired user is not permitted to login. */ expiry?: pulumi.Input<number>; /** * The factor used by the password encryption scheme. If not provided, the PasswordEncryptor provides a default value. * Generally this will be used as an iteration count to generate the hash. The actual use of this value is up to the * PasswordEncryptor implementation. */ factor?: pulumi.Input<number>; /** * The first name of the User. */ firstName?: pulumi.Input<string>; /** * The User’s full name as a separate field that is not calculated from firstName and lastName. */ fullName?: pulumi.Input<string>; /** * The URL that points to an image file that is the User’s profile image. */ imageUrl?: pulumi.Input<string>; /** * The User’s last name. */ lastName?: pulumi.Input<string>; /** * The User’s middle name. */ middleName?: pulumi.Input<string>; /** * The User’s mobile phone number. This is useful is you will be sending push notifications or SMS messages to the User. */ mobilePhone?: pulumi.Input<string>; /** * The email address of the user’s parent or guardian. This field is used to allow a child user to identify their parent so FusionAuth can make a request to the parent to confirm the parent relationship. */ parentEmail?: pulumi.Input<string>; /** * The User’s plaintext password. This password will be hashed and the provided value will never be stored and cannot be retrieved. */ password?: pulumi.Input<string>; /** * Indicates that the User’s password needs to be changed during their next login attempt. */ passwordChangeRequired?: pulumi.Input<boolean>; /** * An array of locale strings that give, in order, the User’s preferred languages. These are important for email templates and other localizable text. */ preferredLanguages?: pulumi.Input<pulumi.Input<string>[]>; /** * Indicates to FusionAuth to send the User an email asking them to set their password. The Email Template that is used is configured in the System Configuration setting for Set Password Email Template. */ sendSetPasswordEmail?: pulumi.Input<boolean>; /** * Indicates to FusionAuth that it should skip email verification even if it is enabled. This is useful for creating admin or internal User accounts. */ skipVerification?: pulumi.Input<boolean>; /** * The unique Id of the tenant used to scope this API request. */ tenantId?: pulumi.Input<string>; /** * The User’s preferred timezone. The string must be in an IANA time zone format. */ timezone?: pulumi.Input<string>; twoFactorMethods?: pulumi.Input<pulumi.Input<inputs.FusionAuthUserTwoFactorMethod>[]>; /** * A list of recovery codes. These may be used in place of a code provided by an MFA factor. They are single use. If a recovery code is used in a disable request, all MFA methods are removed. If, after that, a Multi-Factor method is added, a new set of recovery codes will be generated. */ twoFactorRecoveryCodes?: pulumi.Input<pulumi.Input<string>[]>; /** * The Id to use for the new User. If not specified a secure random UUID will be generated.. */ userId?: pulumi.Input<string>; /** * The username of the User. The username is stored and returned as a case sensitive value, however a username is considered unique regardless of the case. bob is considered equal to BoB so either version of this username can be used whenever providing it as input to an API. */ username?: pulumi.Input<string>; /** * The current status of the username. This is used if you are moderating usernames via CleanSpeak. */ usernameStatus?: pulumi.Input<string>; } /** * The set of arguments for constructing a FusionAuthUser resource. */ export interface FusionAuthUserArgs { /** * An optional Application Id. When this value is provided, it will be used to resolve an application specific email template if you have configured transactional emails such as setup password, email verification and others. */ applicationId?: pulumi.Input<string>; /** * An ISO-8601 formatted date of the User’s birthdate such as YYYY-MM-DD. */ birthDate?: pulumi.Input<string>; /** * An object that can hold any information about a User that should be persisted. Must be a JSON serialised string. */ data?: pulumi.Input<string>; /** * A tenant has the option to configure one or more email domains to be blocked in order to restrict email domains during user create or update. Setting this property equal to true will override the tenant configuration. See `registration_configuration.blocked_domains` in the Tenant resource. */ disableDomainBlock?: pulumi.Input<boolean>; /** * The User’s email address. An email address is a unique in FusionAuth and stored in lower case. */ email?: pulumi.Input<string>; /** * The method for encrypting the User’s password. */ encryptionScheme?: pulumi.Input<string>; /** * The expiration instant of the User’s account. An expired user is not permitted to login. */ expiry?: pulumi.Input<number>; /** * The factor used by the password encryption scheme. If not provided, the PasswordEncryptor provides a default value. * Generally this will be used as an iteration count to generate the hash. The actual use of this value is up to the * PasswordEncryptor implementation. */ factor?: pulumi.Input<number>; /** * The first name of the User. */ firstName?: pulumi.Input<string>; /** * The User’s full name as a separate field that is not calculated from firstName and lastName. */ fullName?: pulumi.Input<string>; /** * The URL that points to an image file that is the User’s profile image. */ imageUrl?: pulumi.Input<string>; /** * The User’s last name. */ lastName?: pulumi.Input<string>; /** * The User’s middle name. */ middleName?: pulumi.Input<string>; /** * The User’s mobile phone number. This is useful is you will be sending push notifications or SMS messages to the User. */ mobilePhone?: pulumi.Input<string>; /** * The email address of the user’s parent or guardian. This field is used to allow a child user to identify their parent so FusionAuth can make a request to the parent to confirm the parent relationship. */ parentEmail?: pulumi.Input<string>; /** * The User’s plaintext password. This password will be hashed and the provided value will never be stored and cannot be retrieved. */ password?: pulumi.Input<string>; /** * Indicates that the User’s password needs to be changed during their next login attempt. */ passwordChangeRequired?: pulumi.Input<boolean>; /** * An array of locale strings that give, in order, the User’s preferred languages. These are important for email templates and other localizable text. */ preferredLanguages?: pulumi.Input<pulumi.Input<string>[]>; /** * Indicates to FusionAuth to send the User an email asking them to set their password. The Email Template that is used is configured in the System Configuration setting for Set Password Email Template. */ sendSetPasswordEmail?: pulumi.Input<boolean>; /** * Indicates to FusionAuth that it should skip email verification even if it is enabled. This is useful for creating admin or internal User accounts. */ skipVerification?: pulumi.Input<boolean>; /** * The unique Id of the tenant used to scope this API request. */ tenantId?: pulumi.Input<string>; /** * The User’s preferred timezone. The string must be in an IANA time zone format. */ timezone?: pulumi.Input<string>; twoFactorMethods?: pulumi.Input<pulumi.Input<inputs.FusionAuthUserTwoFactorMethod>[]>; /** * A list of recovery codes. These may be used in place of a code provided by an MFA factor. They are single use. If a recovery code is used in a disable request, all MFA methods are removed. If, after that, a Multi-Factor method is added, a new set of recovery codes will be generated. */ twoFactorRecoveryCodes?: pulumi.Input<pulumi.Input<string>[]>; /** * The Id to use for the new User. If not specified a secure random UUID will be generated.. */ userId?: pulumi.Input<string>; /** * The username of the User. The username is stored and returned as a case sensitive value, however a username is considered unique regardless of the case. bob is considered equal to BoB so either version of this username can be used whenever providing it as input to an API. */ username?: pulumi.Input<string>; /** * The current status of the username. This is used if you are moderating usernames via CleanSpeak. */ usernameStatus?: pulumi.Input<string>; }