pulumi-fusionauth
Version:
A Pulumi package for managing FusionAuth instances.
98 lines • 4.6 kB
JavaScript
;
// *** 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.FusionAuthFormField = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## # Form Field Resource
*
* A FusionAuth Form Field is an object that can be customized to receive input within a FusionAuth Form.
*
* [Form Field API](https://fusionauth.io/docs/v1/tech/apis/form-fields/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fusionauth from "pulumi-fusionauth";
*
* const field = new fusionauth.FusionAuthFormField("field", {
* confirm: true,
* data: {
* leftAddOn: "send",
* },
* description: "Information about this custom field",
* key: "user.firstName",
* required: true,
* });
* ```
*/
class FusionAuthFormField extends pulumi.CustomResource {
/**
* Get an existing FusionAuthFormField 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 FusionAuthFormField(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of FusionAuthFormField. 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'] === FusionAuthFormField.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["confirm"] = state ? state.confirm : undefined;
resourceInputs["consentId"] = state ? state.consentId : undefined;
resourceInputs["control"] = state ? state.control : undefined;
resourceInputs["data"] = state ? state.data : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["formFieldId"] = state ? state.formFieldId : undefined;
resourceInputs["key"] = state ? state.key : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["options"] = state ? state.options : undefined;
resourceInputs["required"] = state ? state.required : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["validator"] = state ? state.validator : undefined;
}
else {
const args = argsOrState;
if ((!args || args.key === undefined) && !opts.urn) {
throw new Error("Missing required property 'key'");
}
resourceInputs["confirm"] = args ? args.confirm : undefined;
resourceInputs["consentId"] = args ? args.consentId : undefined;
resourceInputs["control"] = args ? args.control : undefined;
resourceInputs["data"] = args ? args.data : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["formFieldId"] = args ? args.formFieldId : undefined;
resourceInputs["key"] = args ? args.key : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["options"] = args ? args.options : undefined;
resourceInputs["required"] = args ? args.required : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["validator"] = args ? args.validator : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(FusionAuthFormField.__pulumiType, name, resourceInputs, opts);
}
}
exports.FusionAuthFormField = FusionAuthFormField;
/** @internal */
FusionAuthFormField.__pulumiType = 'fusionauth:index/fusionAuthFormField:FusionAuthFormField';
//# sourceMappingURL=fusionAuthFormField.js.map