1. Packages
  2. FusionAuth
  3. API Docs
  4. FusionAuthFormField
FusionAuth v5.1.0 published on Tuesday, Oct 22, 2024 by Theo Gravity

fusionauth.FusionAuthFormField

Explore with Pulumi AI

fusionauth logo
FusionAuth v5.1.0 published on Tuesday, Oct 22, 2024 by Theo Gravity

    # Form Field Resource

    A FusionAuth Form Field is an object that can be customized to receive input within a FusionAuth Form.

    Form Field API

    Example Usage

    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,
    });
    
    import pulumi
    import theogravity_pulumi_fusionauth as fusionauth
    
    field = fusionauth.FusionAuthFormField("field",
        confirm=True,
        data={
            "leftAddOn": "send",
        },
        description="Information about this custom field",
        key="user.firstName",
        required=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/theogravity/pulumi-fusionauth/sdk/go/fusionauth"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := fusionauth.NewFusionAuthFormField(ctx, "field", &fusionauth.FusionAuthFormFieldArgs{
    			Confirm: pulumi.Bool(true),
    			Data: pulumi.Map{
    				"leftAddOn": pulumi.Any("send"),
    			},
    			Description: pulumi.String("Information about this custom field"),
    			Key:         pulumi.String("user.firstName"),
    			Required:    pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fusionauth = theogravity.Fusionauth;
    
    return await Deployment.RunAsync(() => 
    {
        var field = new Fusionauth.FusionAuthFormField("field", new()
        {
            Confirm = true,
            Data = 
            {
                { "leftAddOn", "send" },
            },
            Description = "Information about this custom field",
            Key = "user.firstName",
            Required = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fusionauth.FusionAuthFormField;
    import com.pulumi.fusionauth.FusionAuthFormFieldArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var field = new FusionAuthFormField("field", FusionAuthFormFieldArgs.builder()
                .confirm(true)
                .data(Map.of("leftAddOn", "send"))
                .description("Information about this custom field")
                .key("user.firstName")
                .required(true)
                .build());
    
        }
    }
    
    resources:
      field:
        type: fusionauth:FusionAuthFormField
        properties:
          confirm: true
          data:
            leftAddOn: send
          description: Information about this custom field
          key: user.firstName
          required: true
    

    Create FusionAuthFormField Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FusionAuthFormField(name: string, args: FusionAuthFormFieldArgs, opts?: CustomResourceOptions);
    @overload
    def FusionAuthFormField(resource_name: str,
                            args: FusionAuthFormFieldArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def FusionAuthFormField(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            key: Optional[str] = None,
                            confirm: Optional[bool] = None,
                            consent_id: Optional[str] = None,
                            control: Optional[str] = None,
                            data: Optional[Mapping[str, Any]] = None,
                            description: Optional[str] = None,
                            form_field_id: Optional[str] = None,
                            name: Optional[str] = None,
                            options: Optional[Sequence[str]] = None,
                            required: Optional[bool] = None,
                            type: Optional[str] = None,
                            validator: Optional[FusionAuthFormFieldValidatorArgs] = None)
    func NewFusionAuthFormField(ctx *Context, name string, args FusionAuthFormFieldArgs, opts ...ResourceOption) (*FusionAuthFormField, error)
    public FusionAuthFormField(string name, FusionAuthFormFieldArgs args, CustomResourceOptions? opts = null)
    public FusionAuthFormField(String name, FusionAuthFormFieldArgs args)
    public FusionAuthFormField(String name, FusionAuthFormFieldArgs args, CustomResourceOptions options)
    
    type: fusionauth:FusionAuthFormField
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FusionAuthFormFieldArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FusionAuthFormFieldArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FusionAuthFormFieldArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FusionAuthFormFieldArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FusionAuthFormFieldArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var fusionAuthFormFieldResource = new Fusionauth.FusionAuthFormField("fusionAuthFormFieldResource", new()
    {
        Key = "string",
        Confirm = false,
        ConsentId = "string",
        Control = "string",
        Data = 
        {
            { "string", "any" },
        },
        Description = "string",
        FormFieldId = "string",
        Name = "string",
        Options = new[]
        {
            "string",
        },
        Required = false,
        Type = "string",
        Validator = new Fusionauth.Inputs.FusionAuthFormFieldValidatorArgs
        {
            Enabled = false,
            Expression = "string",
        },
    });
    
    example, err := fusionauth.NewFusionAuthFormField(ctx, "fusionAuthFormFieldResource", &fusionauth.FusionAuthFormFieldArgs{
    	Key:       pulumi.String("string"),
    	Confirm:   pulumi.Bool(false),
    	ConsentId: pulumi.String("string"),
    	Control:   pulumi.String("string"),
    	Data: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Description: pulumi.String("string"),
    	FormFieldId: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Options: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Required: pulumi.Bool(false),
    	Type:     pulumi.String("string"),
    	Validator: &fusionauth.FusionAuthFormFieldValidatorArgs{
    		Enabled:    pulumi.Bool(false),
    		Expression: pulumi.String("string"),
    	},
    })
    
    var fusionAuthFormFieldResource = new FusionAuthFormField("fusionAuthFormFieldResource", FusionAuthFormFieldArgs.builder()
        .key("string")
        .confirm(false)
        .consentId("string")
        .control("string")
        .data(Map.of("string", "any"))
        .description("string")
        .formFieldId("string")
        .name("string")
        .options("string")
        .required(false)
        .type("string")
        .validator(FusionAuthFormFieldValidatorArgs.builder()
            .enabled(false)
            .expression("string")
            .build())
        .build());
    
    fusion_auth_form_field_resource = fusionauth.FusionAuthFormField("fusionAuthFormFieldResource",
        key="string",
        confirm=False,
        consent_id="string",
        control="string",
        data={
            "string": "any",
        },
        description="string",
        form_field_id="string",
        name="string",
        options=["string"],
        required=False,
        type="string",
        validator={
            "enabled": False,
            "expression": "string",
        })
    
    const fusionAuthFormFieldResource = new fusionauth.FusionAuthFormField("fusionAuthFormFieldResource", {
        key: "string",
        confirm: false,
        consentId: "string",
        control: "string",
        data: {
            string: "any",
        },
        description: "string",
        formFieldId: "string",
        name: "string",
        options: ["string"],
        required: false,
        type: "string",
        validator: {
            enabled: false,
            expression: "string",
        },
    });
    
    type: fusionauth:FusionAuthFormField
    properties:
        confirm: false
        consentId: string
        control: string
        data:
            string: any
        description: string
        formFieldId: string
        key: string
        name: string
        options:
            - string
        required: false
        type: string
        validator:
            enabled: false
            expression: string
    

    FusionAuthFormField Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The FusionAuthFormField resource accepts the following input properties:

    Key string
    The key is the path to the value in the user or registration object.
    Confirm bool
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    ConsentId string
    The Id of an existing Consent. This field will be required when the type is set to consent.
    Control string
    The Form Field control
    Data Dictionary<string, object>
    An object that can hold any information about the Form Field that should be persisted.
    Description string
    A description of the Form Field.
    FormFieldId string
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    Name string
    The unique name of the Form Field.
    Options List<string>
    A list of options that are applied to checkbox, radio, or select controls.
    Required bool
    Determines if a value is required to complete the form.
    Type string
    The data type used to store the value in FusionAuth.
    Validator theogravity.Fusionauth.Inputs.FusionAuthFormFieldValidator
    Key string
    The key is the path to the value in the user or registration object.
    Confirm bool
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    ConsentId string
    The Id of an existing Consent. This field will be required when the type is set to consent.
    Control string
    The Form Field control
    Data map[string]interface{}
    An object that can hold any information about the Form Field that should be persisted.
    Description string
    A description of the Form Field.
    FormFieldId string
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    Name string
    The unique name of the Form Field.
    Options []string
    A list of options that are applied to checkbox, radio, or select controls.
    Required bool
    Determines if a value is required to complete the form.
    Type string
    The data type used to store the value in FusionAuth.
    Validator FusionAuthFormFieldValidatorArgs
    key String
    The key is the path to the value in the user or registration object.
    confirm Boolean
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    consentId String
    The Id of an existing Consent. This field will be required when the type is set to consent.
    control String
    The Form Field control
    data Map<String,Object>
    An object that can hold any information about the Form Field that should be persisted.
    description String
    A description of the Form Field.
    formFieldId String
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    name String
    The unique name of the Form Field.
    options List<String>
    A list of options that are applied to checkbox, radio, or select controls.
    required Boolean
    Determines if a value is required to complete the form.
    type String
    The data type used to store the value in FusionAuth.
    validator FusionAuthFormFieldValidator
    key string
    The key is the path to the value in the user or registration object.
    confirm boolean
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    consentId string
    The Id of an existing Consent. This field will be required when the type is set to consent.
    control string
    The Form Field control
    data {[key: string]: any}
    An object that can hold any information about the Form Field that should be persisted.
    description string
    A description of the Form Field.
    formFieldId string
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    name string
    The unique name of the Form Field.
    options string[]
    A list of options that are applied to checkbox, radio, or select controls.
    required boolean
    Determines if a value is required to complete the form.
    type string
    The data type used to store the value in FusionAuth.
    validator FusionAuthFormFieldValidator
    key str
    The key is the path to the value in the user or registration object.
    confirm bool
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    consent_id str
    The Id of an existing Consent. This field will be required when the type is set to consent.
    control str
    The Form Field control
    data Mapping[str, Any]
    An object that can hold any information about the Form Field that should be persisted.
    description str
    A description of the Form Field.
    form_field_id str
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    name str
    The unique name of the Form Field.
    options Sequence[str]
    A list of options that are applied to checkbox, radio, or select controls.
    required bool
    Determines if a value is required to complete the form.
    type str
    The data type used to store the value in FusionAuth.
    validator FusionAuthFormFieldValidatorArgs
    key String
    The key is the path to the value in the user or registration object.
    confirm Boolean
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    consentId String
    The Id of an existing Consent. This field will be required when the type is set to consent.
    control String
    The Form Field control
    data Map<Any>
    An object that can hold any information about the Form Field that should be persisted.
    description String
    A description of the Form Field.
    formFieldId String
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    name String
    The unique name of the Form Field.
    options List<String>
    A list of options that are applied to checkbox, radio, or select controls.
    required Boolean
    Determines if a value is required to complete the form.
    type String
    The data type used to store the value in FusionAuth.
    validator Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FusionAuthFormField resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing FusionAuthFormField Resource

    Get an existing FusionAuthFormField resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FusionAuthFormFieldState, opts?: CustomResourceOptions): FusionAuthFormField
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            confirm: Optional[bool] = None,
            consent_id: Optional[str] = None,
            control: Optional[str] = None,
            data: Optional[Mapping[str, Any]] = None,
            description: Optional[str] = None,
            form_field_id: Optional[str] = None,
            key: Optional[str] = None,
            name: Optional[str] = None,
            options: Optional[Sequence[str]] = None,
            required: Optional[bool] = None,
            type: Optional[str] = None,
            validator: Optional[FusionAuthFormFieldValidatorArgs] = None) -> FusionAuthFormField
    func GetFusionAuthFormField(ctx *Context, name string, id IDInput, state *FusionAuthFormFieldState, opts ...ResourceOption) (*FusionAuthFormField, error)
    public static FusionAuthFormField Get(string name, Input<string> id, FusionAuthFormFieldState? state, CustomResourceOptions? opts = null)
    public static FusionAuthFormField get(String name, Output<String> id, FusionAuthFormFieldState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Confirm bool
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    ConsentId string
    The Id of an existing Consent. This field will be required when the type is set to consent.
    Control string
    The Form Field control
    Data Dictionary<string, object>
    An object that can hold any information about the Form Field that should be persisted.
    Description string
    A description of the Form Field.
    FormFieldId string
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    Key string
    The key is the path to the value in the user or registration object.
    Name string
    The unique name of the Form Field.
    Options List<string>
    A list of options that are applied to checkbox, radio, or select controls.
    Required bool
    Determines if a value is required to complete the form.
    Type string
    The data type used to store the value in FusionAuth.
    Validator theogravity.Fusionauth.Inputs.FusionAuthFormFieldValidator
    Confirm bool
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    ConsentId string
    The Id of an existing Consent. This field will be required when the type is set to consent.
    Control string
    The Form Field control
    Data map[string]interface{}
    An object that can hold any information about the Form Field that should be persisted.
    Description string
    A description of the Form Field.
    FormFieldId string
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    Key string
    The key is the path to the value in the user or registration object.
    Name string
    The unique name of the Form Field.
    Options []string
    A list of options that are applied to checkbox, radio, or select controls.
    Required bool
    Determines if a value is required to complete the form.
    Type string
    The data type used to store the value in FusionAuth.
    Validator FusionAuthFormFieldValidatorArgs
    confirm Boolean
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    consentId String
    The Id of an existing Consent. This field will be required when the type is set to consent.
    control String
    The Form Field control
    data Map<String,Object>
    An object that can hold any information about the Form Field that should be persisted.
    description String
    A description of the Form Field.
    formFieldId String
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    key String
    The key is the path to the value in the user or registration object.
    name String
    The unique name of the Form Field.
    options List<String>
    A list of options that are applied to checkbox, radio, or select controls.
    required Boolean
    Determines if a value is required to complete the form.
    type String
    The data type used to store the value in FusionAuth.
    validator FusionAuthFormFieldValidator
    confirm boolean
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    consentId string
    The Id of an existing Consent. This field will be required when the type is set to consent.
    control string
    The Form Field control
    data {[key: string]: any}
    An object that can hold any information about the Form Field that should be persisted.
    description string
    A description of the Form Field.
    formFieldId string
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    key string
    The key is the path to the value in the user or registration object.
    name string
    The unique name of the Form Field.
    options string[]
    A list of options that are applied to checkbox, radio, or select controls.
    required boolean
    Determines if a value is required to complete the form.
    type string
    The data type used to store the value in FusionAuth.
    validator FusionAuthFormFieldValidator
    confirm bool
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    consent_id str
    The Id of an existing Consent. This field will be required when the type is set to consent.
    control str
    The Form Field control
    data Mapping[str, Any]
    An object that can hold any information about the Form Field that should be persisted.
    description str
    A description of the Form Field.
    form_field_id str
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    key str
    The key is the path to the value in the user or registration object.
    name str
    The unique name of the Form Field.
    options Sequence[str]
    A list of options that are applied to checkbox, radio, or select controls.
    required bool
    Determines if a value is required to complete the form.
    type str
    The data type used to store the value in FusionAuth.
    validator FusionAuthFormFieldValidatorArgs
    confirm Boolean
    Determines if the user input should be confirmed by requiring the value to be entered twice. If true, a confirmation field is included.
    consentId String
    The Id of an existing Consent. This field will be required when the type is set to consent.
    control String
    The Form Field control
    data Map<Any>
    An object that can hold any information about the Form Field that should be persisted.
    description String
    A description of the Form Field.
    formFieldId String
    The Id to use for the new Form Field. If not specified a secure random UUID will be generated.
    key String
    The key is the path to the value in the user or registration object.
    name String
    The unique name of the Form Field.
    options List<String>
    A list of options that are applied to checkbox, radio, or select controls.
    required Boolean
    Determines if a value is required to complete the form.
    type String
    The data type used to store the value in FusionAuth.
    validator Property Map

    Supporting Types

    FusionAuthFormFieldValidator, FusionAuthFormFieldValidatorArgs

    Enabled bool
    Determines if user input should be validated.
    Expression string
    A regular expression used to validate user input. Must be a valid regular expression pattern.
    Enabled bool
    Determines if user input should be validated.
    Expression string
    A regular expression used to validate user input. Must be a valid regular expression pattern.
    enabled Boolean
    Determines if user input should be validated.
    expression String
    A regular expression used to validate user input. Must be a valid regular expression pattern.
    enabled boolean
    Determines if user input should be validated.
    expression string
    A regular expression used to validate user input. Must be a valid regular expression pattern.
    enabled bool
    Determines if user input should be validated.
    expression str
    A regular expression used to validate user input. Must be a valid regular expression pattern.
    enabled Boolean
    Determines if user input should be validated.
    expression String
    A regular expression used to validate user input. Must be a valid regular expression pattern.

    Package Details

    Repository
    fusionauth theogravity/pulumi-fusionauth
    License
    MIT
    Notes
    This Pulumi package is based on the fusionauth Terraform Provider.
    fusionauth logo
    FusionAuth v5.1.0 published on Tuesday, Oct 22, 2024 by Theo Gravity