UNPKG

pulumi-fusionauth

Version:

A Pulumi package for managing FusionAuth instances.

144 lines 7.87 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.FusionAuthUser = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## # 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", * }); * ``` */ 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, id, state, opts) { return new FusionAuthUser(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === FusionAuthUser.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applicationId"] = state ? state.applicationId : undefined; resourceInputs["birthDate"] = state ? state.birthDate : undefined; resourceInputs["data"] = state ? state.data : undefined; resourceInputs["disableDomainBlock"] = state ? state.disableDomainBlock : undefined; resourceInputs["email"] = state ? state.email : undefined; resourceInputs["encryptionScheme"] = state ? state.encryptionScheme : undefined; resourceInputs["expiry"] = state ? state.expiry : undefined; resourceInputs["factor"] = state ? state.factor : undefined; resourceInputs["firstName"] = state ? state.firstName : undefined; resourceInputs["fullName"] = state ? state.fullName : undefined; resourceInputs["imageUrl"] = state ? state.imageUrl : undefined; resourceInputs["lastName"] = state ? state.lastName : undefined; resourceInputs["middleName"] = state ? state.middleName : undefined; resourceInputs["mobilePhone"] = state ? state.mobilePhone : undefined; resourceInputs["parentEmail"] = state ? state.parentEmail : undefined; resourceInputs["password"] = state ? state.password : undefined; resourceInputs["passwordChangeRequired"] = state ? state.passwordChangeRequired : undefined; resourceInputs["preferredLanguages"] = state ? state.preferredLanguages : undefined; resourceInputs["sendSetPasswordEmail"] = state ? state.sendSetPasswordEmail : undefined; resourceInputs["skipVerification"] = state ? state.skipVerification : undefined; resourceInputs["tenantId"] = state ? state.tenantId : undefined; resourceInputs["timezone"] = state ? state.timezone : undefined; resourceInputs["twoFactorMethods"] = state ? state.twoFactorMethods : undefined; resourceInputs["twoFactorRecoveryCodes"] = state ? state.twoFactorRecoveryCodes : undefined; resourceInputs["userId"] = state ? state.userId : undefined; resourceInputs["username"] = state ? state.username : undefined; resourceInputs["usernameStatus"] = state ? state.usernameStatus : undefined; } else { const args = argsOrState; resourceInputs["applicationId"] = args ? args.applicationId : undefined; resourceInputs["birthDate"] = args ? args.birthDate : undefined; resourceInputs["data"] = args ? args.data : undefined; resourceInputs["disableDomainBlock"] = args ? args.disableDomainBlock : undefined; resourceInputs["email"] = args ? args.email : undefined; resourceInputs["encryptionScheme"] = args ? args.encryptionScheme : undefined; resourceInputs["expiry"] = args ? args.expiry : undefined; resourceInputs["factor"] = args ? args.factor : undefined; resourceInputs["firstName"] = args ? args.firstName : undefined; resourceInputs["fullName"] = args ? args.fullName : undefined; resourceInputs["imageUrl"] = args ? args.imageUrl : undefined; resourceInputs["lastName"] = args ? args.lastName : undefined; resourceInputs["middleName"] = args ? args.middleName : undefined; resourceInputs["mobilePhone"] = args ? args.mobilePhone : undefined; resourceInputs["parentEmail"] = args ? args.parentEmail : undefined; resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined; resourceInputs["passwordChangeRequired"] = args ? args.passwordChangeRequired : undefined; resourceInputs["preferredLanguages"] = args ? args.preferredLanguages : undefined; resourceInputs["sendSetPasswordEmail"] = args ? args.sendSetPasswordEmail : undefined; resourceInputs["skipVerification"] = args ? args.skipVerification : undefined; resourceInputs["tenantId"] = args ? args.tenantId : undefined; resourceInputs["timezone"] = args ? args.timezone : undefined; resourceInputs["twoFactorMethods"] = args ? args.twoFactorMethods : undefined; resourceInputs["twoFactorRecoveryCodes"] = (args === null || args === void 0 ? void 0 : args.twoFactorRecoveryCodes) ? pulumi.secret(args.twoFactorRecoveryCodes) : undefined; resourceInputs["userId"] = args ? args.userId : undefined; resourceInputs["username"] = args ? args.username : undefined; resourceInputs["usernameStatus"] = args ? args.usernameStatus : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password", "twoFactorRecoveryCodes"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(FusionAuthUser.__pulumiType, name, resourceInputs, opts); } } exports.FusionAuthUser = FusionAuthUser; /** @internal */ FusionAuthUser.__pulumiType = 'fusionauth:index/fusionAuthUser:FusionAuthUser'; //# sourceMappingURL=fusionAuthUser.js.map