1. Packages
  2. Auth0 Provider
  3. API Docs
  4. Flow
Auth0 v3.8.3 published on Wednesday, Nov 6, 2024 by Pulumi

auth0.Flow

Explore with Pulumi AI

auth0 logo
Auth0 v3.8.3 published on Wednesday, Nov 6, 2024 by Pulumi

    With this resource, you can create and manage Flows for a tenant.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    // Example:
    const myFlow = new auth0.Flow("my_flow", {
        actions: JSON.stringify([{
            action: "UPDATE_USER",
            alias: "user meta data",
            allow_failure: false,
            id: "update_user_PmSa",
            mask_output: false,
            params: {
                changes: {
                    user_metadata: {
                        full_name: "{{fields.full_name}}",
                    },
                },
                connection_id: "<vault_connection_id>",
                user_id: "{{context.user.user_id}}",
            },
            type: "AUTH0",
        }]),
        name: "Flow KYC update data",
    });
    
    import pulumi
    import json
    import pulumi_auth0 as auth0
    
    # Example:
    my_flow = auth0.Flow("my_flow",
        actions=json.dumps([{
            "action": "UPDATE_USER",
            "alias": "user meta data",
            "allow_failure": False,
            "id": "update_user_PmSa",
            "mask_output": False,
            "params": {
                "changes": {
                    "user_metadata": {
                        "full_name": "{{fields.full_name}}",
                    },
                },
                "connection_id": "<vault_connection_id>",
                "user_id": "{{context.user.user_id}}",
            },
            "type": "AUTH0",
        }]),
        name="Flow KYC update data")
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal([]map[string]interface{}{
    			map[string]interface{}{
    				"action":        "UPDATE_USER",
    				"alias":         "user meta data",
    				"allow_failure": false,
    				"id":            "update_user_PmSa",
    				"mask_output":   false,
    				"params": map[string]interface{}{
    					"changes": map[string]interface{}{
    						"user_metadata": map[string]interface{}{
    							"full_name": "{{fields.full_name}}",
    						},
    					},
    					"connection_id": "<vault_connection_id>",
    					"user_id":       "{{context.user.user_id}}",
    				},
    				"type": "AUTH0",
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		// Example:
    		_, err = auth0.NewFlow(ctx, "my_flow", &auth0.FlowArgs{
    			Actions: pulumi.String(json0),
    			Name:    pulumi.String("Flow KYC update data"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        // Example:
        var myFlow = new Auth0.Flow("my_flow", new()
        {
            Actions = JsonSerializer.Serialize(new[]
            {
                new Dictionary<string, object?>
                {
                    ["action"] = "UPDATE_USER",
                    ["alias"] = "user meta data",
                    ["allow_failure"] = false,
                    ["id"] = "update_user_PmSa",
                    ["mask_output"] = false,
                    ["params"] = new Dictionary<string, object?>
                    {
                        ["changes"] = new Dictionary<string, object?>
                        {
                            ["user_metadata"] = new Dictionary<string, object?>
                            {
                                ["full_name"] = "{{fields.full_name}}",
                            },
                        },
                        ["connection_id"] = "<vault_connection_id>",
                        ["user_id"] = "{{context.user.user_id}}",
                    },
                    ["type"] = "AUTH0",
                },
            }),
            Name = "Flow KYC update data",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.auth0.Flow;
    import com.pulumi.auth0.FlowArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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) {
            // Example:
            var myFlow = new Flow("myFlow", FlowArgs.builder()
                .actions(serializeJson(
                    jsonArray(jsonObject(
                        jsonProperty("action", "UPDATE_USER"),
                        jsonProperty("alias", "user meta data"),
                        jsonProperty("allow_failure", false),
                        jsonProperty("id", "update_user_PmSa"),
                        jsonProperty("mask_output", false),
                        jsonProperty("params", jsonObject(
                            jsonProperty("changes", jsonObject(
                                jsonProperty("user_metadata", jsonObject(
                                    jsonProperty("full_name", "{{fields.full_name}}")
                                ))
                            )),
                            jsonProperty("connection_id", "<vault_connection_id>"),
                            jsonProperty("user_id", "{{context.user.user_id}}")
                        )),
                        jsonProperty("type", "AUTH0")
                    ))))
                .name("Flow KYC update data")
                .build());
    
        }
    }
    
    resources:
      # Example:
      myFlow:
        type: auth0:Flow
        name: my_flow
        properties:
          actions:
            fn::toJSON:
              - action: UPDATE_USER
                alias: user meta data
                allow_failure: false
                id: update_user_PmSa
                mask_output: false
                params:
                  changes:
                    user_metadata:
                      full_name: '{{fields.full_name}}'
                  connection_id: <vault_connection_id>
                  user_id: '{{context.user.user_id}}'
                type: AUTH0
          name: Flow KYC update data
    

    Create Flow Resource

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

    Constructor syntax

    new Flow(name: string, args?: FlowArgs, opts?: CustomResourceOptions);
    @overload
    def Flow(resource_name: str,
             args: Optional[FlowArgs] = None,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Flow(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             actions: Optional[str] = None,
             name: Optional[str] = None)
    func NewFlow(ctx *Context, name string, args *FlowArgs, opts ...ResourceOption) (*Flow, error)
    public Flow(string name, FlowArgs? args = null, CustomResourceOptions? opts = null)
    public Flow(String name, FlowArgs args)
    public Flow(String name, FlowArgs args, CustomResourceOptions options)
    
    type: auth0:Flow
    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 FlowArgs
    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 FlowArgs
    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 FlowArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FlowArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FlowArgs
    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 flowResource = new Auth0.Flow("flowResource", new()
    {
        Actions = "string",
        Name = "string",
    });
    
    example, err := auth0.NewFlow(ctx, "flowResource", &auth0.FlowArgs{
    	Actions: pulumi.String("string"),
    	Name:    pulumi.String("string"),
    })
    
    var flowResource = new Flow("flowResource", FlowArgs.builder()
        .actions("string")
        .name("string")
        .build());
    
    flow_resource = auth0.Flow("flowResource",
        actions="string",
        name="string")
    
    const flowResource = new auth0.Flow("flowResource", {
        actions: "string",
        name: "string",
    });
    
    type: auth0:Flow
    properties:
        actions: string
        name: string
    

    Flow 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 Flow resource accepts the following input properties:

    Actions string
    Actions of the flow.
    Name string
    Name of the flow.
    Actions string
    Actions of the flow.
    Name string
    Name of the flow.
    actions String
    Actions of the flow.
    name String
    Name of the flow.
    actions string
    Actions of the flow.
    name string
    Name of the flow.
    actions str
    Actions of the flow.
    name str
    Name of the flow.
    actions String
    Actions of the flow.
    name String
    Name of the flow.

    Outputs

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

    Get an existing Flow 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?: FlowState, opts?: CustomResourceOptions): Flow
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[str] = None,
            name: Optional[str] = None) -> Flow
    func GetFlow(ctx *Context, name string, id IDInput, state *FlowState, opts ...ResourceOption) (*Flow, error)
    public static Flow Get(string name, Input<string> id, FlowState? state, CustomResourceOptions? opts = null)
    public static Flow get(String name, Output<String> id, FlowState 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:
    Actions string
    Actions of the flow.
    Name string
    Name of the flow.
    Actions string
    Actions of the flow.
    Name string
    Name of the flow.
    actions String
    Actions of the flow.
    name String
    Name of the flow.
    actions string
    Actions of the flow.
    name string
    Name of the flow.
    actions str
    Actions of the flow.
    name str
    Name of the flow.
    actions String
    Actions of the flow.
    name String
    Name of the flow.

    Import

    This resource can be imported using the flow ID.

    Example:

    $ pulumi import auth0:index/flow:Flow my_flow "af_4JwsAjokf6DpK8xJCkTRjK"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo
    Auth0 v3.8.3 published on Wednesday, Nov 6, 2024 by Pulumi