1. Packages
  2. FusionAuth
  3. API Docs
  4. FusionAuthLambda
FusionAuth v4.0.1 published on Saturday, Sep 30, 2023 by Theo Gravity

fusionauth.FusionAuthLambda

Explore with Pulumi AI

fusionauth logo
FusionAuth v4.0.1 published on Saturday, Sep 30, 2023 by Theo Gravity

    # Lambda Resource

    Lambdas are user defined JavaScript functions that may be executed at runtime to perform various functions. Lambdas may be used to customize the claims returned in a JWT, reconcile a SAML v2 response or an OpenID Connect response when using these external identity providers.

    Lambdas API

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Fusionauth = theogravity.Fusionauth;
    
    return await Deployment.RunAsync(() => 
    {
        var preferred_Username = new Fusionauth.FusionAuthLambda("preferred Username", new()
        {
            Body = @"// Using the user and registration parameters add additional values to the jwt object.
    function populate(jwt, user, registration) {
      jwt.preferred_username = registration.username;
    }
      
    ",
            Enabled = true,
            Type = "JWTPopulate",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/theogravity/pulumi-fusionauth/sdk/v3/go/fusionauth"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := fusionauth.NewFusionAuthLambda(ctx, "preferred Username", &fusionauth.FusionAuthLambdaArgs{
    			Body:    pulumi.String("// Using the user and registration parameters add additional values to the jwt object.\nfunction populate(jwt, user, registration) {\n  jwt.preferred_username = registration.username;\n}\n  \n"),
    			Enabled: pulumi.Bool(true),
    			Type:    pulumi.String("JWTPopulate"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fusionauth.FusionAuthLambda;
    import com.pulumi.fusionauth.FusionAuthLambdaArgs;
    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 preferred_Username = new FusionAuthLambda("preferred Username", FusionAuthLambdaArgs.builder()        
                .body("""
    // Using the user and registration parameters add additional values to the jwt object.
    function populate(jwt, user, registration) {
      jwt.preferred_username = registration.username;
    }
      
                """)
                .enabled(true)
                .type("JWTPopulate")
                .build());
    
        }
    }
    
    import pulumi
    import theogravity_pulumi-fusionauth as fusionauth
    
    preferred__username = fusionauth.FusionAuthLambda("preferred Username",
        body="""// Using the user and registration parameters add additional values to the jwt object.
    function populate(jwt, user, registration) {
      jwt.preferred_username = registration.username;
    }
      
    """,
        enabled=True,
        type="JWTPopulate")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as fusionauth from "pulumi-fusionauth";
    
    const preferred_Username = new fusionauth.FusionAuthLambda("preferred Username", {
        body: `// Using the user and registration parameters add additional values to the jwt object.
    function populate(jwt, user, registration) {
      jwt.preferred_username = registration.username;
    }
      
    `,
        enabled: true,
        type: "JWTPopulate",
    });
    
    resources:
      preferred Username:
        type: fusionauth:FusionAuthLambda
        properties:
          body: "// Using the user and registration parameters add additional values to the jwt object.\nfunction populate(jwt, user, registration) {\n  jwt.preferred_username = registration.username;\n}\n  \n"
          enabled: true
          type: JWTPopulate
    

    Create FusionAuthLambda Resource

    new FusionAuthLambda(name: string, args: FusionAuthLambdaArgs, opts?: CustomResourceOptions);
    @overload
    def FusionAuthLambda(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         body: Optional[str] = None,
                         debug: Optional[bool] = None,
                         enabled: Optional[bool] = None,
                         engine_type: Optional[str] = None,
                         lambda_id: Optional[str] = None,
                         name: Optional[str] = None,
                         type: Optional[str] = None)
    @overload
    def FusionAuthLambda(resource_name: str,
                         args: FusionAuthLambdaArgs,
                         opts: Optional[ResourceOptions] = None)
    func NewFusionAuthLambda(ctx *Context, name string, args FusionAuthLambdaArgs, opts ...ResourceOption) (*FusionAuthLambda, error)
    public FusionAuthLambda(string name, FusionAuthLambdaArgs args, CustomResourceOptions? opts = null)
    public FusionAuthLambda(String name, FusionAuthLambdaArgs args)
    public FusionAuthLambda(String name, FusionAuthLambdaArgs args, CustomResourceOptions options)
    
    type: fusionauth:FusionAuthLambda
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args FusionAuthLambdaArgs
    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 FusionAuthLambdaArgs
    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 FusionAuthLambdaArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FusionAuthLambdaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FusionAuthLambdaArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    FusionAuthLambda Resource Properties

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

    Inputs

    The FusionAuthLambda resource accepts the following input properties:

    Body string
    The lambda function body, a JavaScript function.
    Type string
    The lambda type. The possible values are:
    Debug bool
    Whether or not debug event logging is enabled for this Lambda.
    Enabled bool
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    EngineType string
    The JavaScript execution engine for the lambda.
    LambdaId string
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    Name string
    The name of the lambda.
    Body string
    The lambda function body, a JavaScript function.
    Type string
    The lambda type. The possible values are:
    Debug bool
    Whether or not debug event logging is enabled for this Lambda.
    Enabled bool
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    EngineType string
    The JavaScript execution engine for the lambda.
    LambdaId string
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    Name string
    The name of the lambda.
    body String
    The lambda function body, a JavaScript function.
    type String
    The lambda type. The possible values are:
    debug Boolean
    Whether or not debug event logging is enabled for this Lambda.
    enabled Boolean
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    engineType String
    The JavaScript execution engine for the lambda.
    lambdaId String
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    name String
    The name of the lambda.
    body string
    The lambda function body, a JavaScript function.
    type string
    The lambda type. The possible values are:
    debug boolean
    Whether or not debug event logging is enabled for this Lambda.
    enabled boolean
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    engineType string
    The JavaScript execution engine for the lambda.
    lambdaId string
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    name string
    The name of the lambda.
    body str
    The lambda function body, a JavaScript function.
    type str
    The lambda type. The possible values are:
    debug bool
    Whether or not debug event logging is enabled for this Lambda.
    enabled bool
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    engine_type str
    The JavaScript execution engine for the lambda.
    lambda_id str
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    name str
    The name of the lambda.
    body String
    The lambda function body, a JavaScript function.
    type String
    The lambda type. The possible values are:
    debug Boolean
    Whether or not debug event logging is enabled for this Lambda.
    enabled Boolean
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    engineType String
    The JavaScript execution engine for the lambda.
    lambdaId String
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    name String
    The name of the lambda.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FusionAuthLambda 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 FusionAuthLambda Resource

    Get an existing FusionAuthLambda 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?: FusionAuthLambdaState, opts?: CustomResourceOptions): FusionAuthLambda
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            body: Optional[str] = None,
            debug: Optional[bool] = None,
            enabled: Optional[bool] = None,
            engine_type: Optional[str] = None,
            lambda_id: Optional[str] = None,
            name: Optional[str] = None,
            type: Optional[str] = None) -> FusionAuthLambda
    func GetFusionAuthLambda(ctx *Context, name string, id IDInput, state *FusionAuthLambdaState, opts ...ResourceOption) (*FusionAuthLambda, error)
    public static FusionAuthLambda Get(string name, Input<string> id, FusionAuthLambdaState? state, CustomResourceOptions? opts = null)
    public static FusionAuthLambda get(String name, Output<String> id, FusionAuthLambdaState 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:
    Body string
    The lambda function body, a JavaScript function.
    Debug bool
    Whether or not debug event logging is enabled for this Lambda.
    Enabled bool
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    EngineType string
    The JavaScript execution engine for the lambda.
    LambdaId string
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    Name string
    The name of the lambda.
    Type string
    The lambda type. The possible values are:
    Body string
    The lambda function body, a JavaScript function.
    Debug bool
    Whether or not debug event logging is enabled for this Lambda.
    Enabled bool
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    EngineType string
    The JavaScript execution engine for the lambda.
    LambdaId string
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    Name string
    The name of the lambda.
    Type string
    The lambda type. The possible values are:
    body String
    The lambda function body, a JavaScript function.
    debug Boolean
    Whether or not debug event logging is enabled for this Lambda.
    enabled Boolean
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    engineType String
    The JavaScript execution engine for the lambda.
    lambdaId String
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    name String
    The name of the lambda.
    type String
    The lambda type. The possible values are:
    body string
    The lambda function body, a JavaScript function.
    debug boolean
    Whether or not debug event logging is enabled for this Lambda.
    enabled boolean
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    engineType string
    The JavaScript execution engine for the lambda.
    lambdaId string
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    name string
    The name of the lambda.
    type string
    The lambda type. The possible values are:
    body str
    The lambda function body, a JavaScript function.
    debug bool
    Whether or not debug event logging is enabled for this Lambda.
    enabled bool
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    engine_type str
    The JavaScript execution engine for the lambda.
    lambda_id str
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    name str
    The name of the lambda.
    type str
    The lambda type. The possible values are:
    body String
    The lambda function body, a JavaScript function.
    debug Boolean
    Whether or not debug event logging is enabled for this Lambda.
    enabled Boolean
    Whether or not this Lambda is enabled.

    Deprecated:Not currently used and may be removed in a future version.

    engineType String
    The JavaScript execution engine for the lambda.
    lambdaId String
    The Id to use for the new lambda. If not specified a secure random UUID will be generated.
    name String
    The name of the lambda.
    type String
    The lambda type. The possible values are:

    Package Details

    Repository
    fusionauth theogravity/pulumi-fusionauth
    License
    MIT
    Notes
    This Pulumi package is based on the fusionauth Terraform Provider.
    fusionauth logo
    FusionAuth v4.0.1 published on Saturday, Sep 30, 2023 by Theo Gravity