UNPKG

pulumi-fusionauth

Version:

A Pulumi package for managing FusionAuth instances.

91 lines 3.68 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.FusionAuthForm = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## # Form Resource * * A FusionAuth Form is a customizable object that contains one-to-many ordered steps. Each step is comprised of one or more Form Fields. * * [Form API](https://fusionauth.io/docs/v1/tech/apis/forms/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fusionauth from "pulumi-fusionauth"; * * const form = new fusionauth.FusionAuthForm("form", { * data: { * description: "This form customizes the registration experience.", * }, * steps: [ * { * fields: ["91909721-7d4f-b110-8f21-cfdee2a1edb8"], * }, * { * fields: [ * "8ed89a31-c325-3156-72ed-6e89183af917", * "a977cfd4-a9ed-c4cf-650f-f4539268ac38", * ], * }, * ], * }); * ``` */ class FusionAuthForm extends pulumi.CustomResource { /** * Get an existing FusionAuthForm 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 FusionAuthForm(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of FusionAuthForm. 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'] === FusionAuthForm.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["data"] = state ? state.data : undefined; resourceInputs["formId"] = state ? state.formId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["steps"] = state ? state.steps : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.steps === undefined) && !opts.urn) { throw new Error("Missing required property 'steps'"); } resourceInputs["data"] = args ? args.data : undefined; resourceInputs["formId"] = args ? args.formId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["steps"] = args ? args.steps : undefined; resourceInputs["type"] = args ? args.type : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FusionAuthForm.__pulumiType, name, resourceInputs, opts); } } exports.FusionAuthForm = FusionAuthForm; /** @internal */ FusionAuthForm.__pulumiType = 'fusionauth:index/fusionAuthForm:FusionAuthForm'; //# sourceMappingURL=fusionAuthForm.js.map