1. Packages
  2. Onelogin Provider
  3. API Docs
  4. Smarthooks
onelogin 0.11.0 published on Friday, Aug 29, 2025 by onelogin

onelogin.Smarthooks

Explore with Pulumi AI

onelogin logo
onelogin 0.11.0 published on Friday, Aug 29, 2025 by onelogin

    Manage SmartHook resources.

    This resource allows you to create and configure SmartHooks.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as onelogin from "@pulumi/onelogin";
    
    const basicTest = new onelogin.Smarthooks("basicTest", {
        disabled: false,
        envVars: ["API_KEY"],
        "function": "CQlmdW5jdGlvbiBteUZ1bmMoKSB7CgkJCWxldCBhID0gMTsKCQkJbGV0IGIgPSAxOwoJCQlsZXQgYyA9IGEgKyBiOwoJCSAgY29uc29sZS5sb2coIkRpbmcgRG9uZyIsIGEsIGIsIGMpOwoJCX0K",
        options: [{
            locationEnabled: false,
            riskEnabled: false,
        }],
        packages: {
            mysql: "^2.18.1",
        },
        retries: 0,
        timeout: 2,
        type: "pre-authentication",
    });
    
    import pulumi
    import pulumi_onelogin as onelogin
    
    basic_test = onelogin.Smarthooks("basicTest",
        disabled=False,
        env_vars=["API_KEY"],
        function="CQlmdW5jdGlvbiBteUZ1bmMoKSB7CgkJCWxldCBhID0gMTsKCQkJbGV0IGIgPSAxOwoJCQlsZXQgYyA9IGEgKyBiOwoJCSAgY29uc29sZS5sb2coIkRpbmcgRG9uZyIsIGEsIGIsIGMpOwoJCX0K",
        options=[{
            "location_enabled": False,
            "risk_enabled": False,
        }],
        packages={
            "mysql": "^2.18.1",
        },
        retries=0,
        timeout=2,
        type="pre-authentication")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/onelogin/onelogin"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := onelogin.NewSmarthooks(ctx, "basicTest", &onelogin.SmarthooksArgs{
    			Disabled: pulumi.Bool(false),
    			EnvVars: pulumi.StringArray{
    				pulumi.String("API_KEY"),
    			},
    			Function: pulumi.String("CQlmdW5jdGlvbiBteUZ1bmMoKSB7CgkJCWxldCBhID0gMTsKCQkJbGV0IGIgPSAxOwoJCQlsZXQgYyA9IGEgKyBiOwoJCSAgY29uc29sZS5sb2coIkRpbmcgRG9uZyIsIGEsIGIsIGMpOwoJCX0K"),
    			Options: onelogin.SmarthooksOptionArray{
    				&onelogin.SmarthooksOptionArgs{
    					LocationEnabled: pulumi.Bool(false),
    					RiskEnabled:     pulumi.Bool(false),
    				},
    			},
    			Packages: pulumi.StringMap{
    				"mysql": pulumi.String("^2.18.1"),
    			},
    			Retries: pulumi.Float64(0),
    			Timeout: pulumi.Float64(2),
    			Type:    pulumi.String("pre-authentication"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Onelogin = Pulumi.Onelogin;
    
    return await Deployment.RunAsync(() => 
    {
        var basicTest = new Onelogin.Smarthooks("basicTest", new()
        {
            Disabled = false,
            EnvVars = new[]
            {
                "API_KEY",
            },
            Function = "CQlmdW5jdGlvbiBteUZ1bmMoKSB7CgkJCWxldCBhID0gMTsKCQkJbGV0IGIgPSAxOwoJCQlsZXQgYyA9IGEgKyBiOwoJCSAgY29uc29sZS5sb2coIkRpbmcgRG9uZyIsIGEsIGIsIGMpOwoJCX0K",
            Options = new[]
            {
                new Onelogin.Inputs.SmarthooksOptionArgs
                {
                    LocationEnabled = false,
                    RiskEnabled = false,
                },
            },
            Packages = 
            {
                { "mysql", "^2.18.1" },
            },
            Retries = 0,
            Timeout = 2,
            Type = "pre-authentication",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.onelogin.Smarthooks;
    import com.pulumi.onelogin.SmarthooksArgs;
    import com.pulumi.onelogin.inputs.SmarthooksOptionArgs;
    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 basicTest = new Smarthooks("basicTest", SmarthooksArgs.builder()
                .disabled(false)
                .envVars("API_KEY")
                .function("CQlmdW5jdGlvbiBteUZ1bmMoKSB7CgkJCWxldCBhID0gMTsKCQkJbGV0IGIgPSAxOwoJCQlsZXQgYyA9IGEgKyBiOwoJCSAgY29uc29sZS5sb2coIkRpbmcgRG9uZyIsIGEsIGIsIGMpOwoJCX0K")
                .options(SmarthooksOptionArgs.builder()
                    .locationEnabled(false)
                    .riskEnabled(false)
                    .build())
                .packages(Map.of("mysql", "^2.18.1"))
                .retries(0)
                .timeout(2)
                .type("pre-authentication")
                .build());
    
        }
    }
    
    resources:
      basicTest:
        type: onelogin:Smarthooks
        properties:
          disabled: false
          envVars:
            - API_KEY
          function: CQlmdW5jdGlvbiBteUZ1bmMoKSB7CgkJCWxldCBhID0gMTsKCQkJbGV0IGIgPSAxOwoJCQlsZXQgYyA9IGEgKyBiOwoJCSAgY29uc29sZS5sb2coIkRpbmcgRG9uZyIsIGEsIGIsIGMpOwoJCX0K
          options:
            - locationEnabled: false
              riskEnabled: false
          packages:
            mysql: ^2.18.1
          retries: 0
          timeout: 2
          type: pre-authentication
    

    Create Smarthooks Resource

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

    Constructor syntax

    new Smarthooks(name: string, args: SmarthooksArgs, opts?: CustomResourceOptions);
    @overload
    def Smarthooks(resource_name: str,
                   args: SmarthooksArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Smarthooks(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   disabled: Optional[bool] = None,
                   env_vars: Optional[Sequence[str]] = None,
                   function: Optional[str] = None,
                   packages: Optional[Mapping[str, str]] = None,
                   retries: Optional[float] = None,
                   runtime: Optional[str] = None,
                   timeout: Optional[float] = None,
                   type: Optional[str] = None,
                   conditions: Optional[Sequence[SmarthooksConditionArgs]] = None,
                   context_version: Optional[str] = None,
                   options: Optional[Sequence[SmarthooksOptionArgs]] = None,
                   smarthooks_id: Optional[str] = None)
    func NewSmarthooks(ctx *Context, name string, args SmarthooksArgs, opts ...ResourceOption) (*Smarthooks, error)
    public Smarthooks(string name, SmarthooksArgs args, CustomResourceOptions? opts = null)
    public Smarthooks(String name, SmarthooksArgs args)
    public Smarthooks(String name, SmarthooksArgs args, CustomResourceOptions options)
    
    type: onelogin:Smarthooks
    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 SmarthooksArgs
    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 SmarthooksArgs
    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 SmarthooksArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SmarthooksArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SmarthooksArgs
    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 smarthooksResource = new Onelogin.Smarthooks("smarthooksResource", new()
    {
        Disabled = false,
        EnvVars = new[]
        {
            "string",
        },
        Function = "string",
        Packages = 
        {
            { "string", "string" },
        },
        Retries = 0,
        Runtime = "string",
        Timeout = 0,
        Type = "string",
        Conditions = new[]
        {
            new Onelogin.Inputs.SmarthooksConditionArgs
            {
                Operator = "string",
                Source = "string",
                Value = "string",
            },
        },
        ContextVersion = "string",
        Options = new[]
        {
            new Onelogin.Inputs.SmarthooksOptionArgs
            {
                LocationEnabled = false,
                MfaDeviceInfoEnabled = false,
                RiskEnabled = false,
            },
        },
        SmarthooksId = "string",
    });
    
    example, err := onelogin.NewSmarthooks(ctx, "smarthooksResource", &onelogin.SmarthooksArgs{
    	Disabled: pulumi.Bool(false),
    	EnvVars: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Function: pulumi.String("string"),
    	Packages: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Retries: pulumi.Float64(0),
    	Runtime: pulumi.String("string"),
    	Timeout: pulumi.Float64(0),
    	Type:    pulumi.String("string"),
    	Conditions: onelogin.SmarthooksConditionArray{
    		&onelogin.SmarthooksConditionArgs{
    			Operator: pulumi.String("string"),
    			Source:   pulumi.String("string"),
    			Value:    pulumi.String("string"),
    		},
    	},
    	ContextVersion: pulumi.String("string"),
    	Options: onelogin.SmarthooksOptionArray{
    		&onelogin.SmarthooksOptionArgs{
    			LocationEnabled:      pulumi.Bool(false),
    			MfaDeviceInfoEnabled: pulumi.Bool(false),
    			RiskEnabled:          pulumi.Bool(false),
    		},
    	},
    	SmarthooksId: pulumi.String("string"),
    })
    
    var smarthooksResource = new Smarthooks("smarthooksResource", SmarthooksArgs.builder()
        .disabled(false)
        .envVars("string")
        .function("string")
        .packages(Map.of("string", "string"))
        .retries(0.0)
        .runtime("string")
        .timeout(0.0)
        .type("string")
        .conditions(SmarthooksConditionArgs.builder()
            .operator("string")
            .source("string")
            .value("string")
            .build())
        .contextVersion("string")
        .options(SmarthooksOptionArgs.builder()
            .locationEnabled(false)
            .mfaDeviceInfoEnabled(false)
            .riskEnabled(false)
            .build())
        .smarthooksId("string")
        .build());
    
    smarthooks_resource = onelogin.Smarthooks("smarthooksResource",
        disabled=False,
        env_vars=["string"],
        function="string",
        packages={
            "string": "string",
        },
        retries=0,
        runtime="string",
        timeout=0,
        type="string",
        conditions=[{
            "operator": "string",
            "source": "string",
            "value": "string",
        }],
        context_version="string",
        options=[{
            "location_enabled": False,
            "mfa_device_info_enabled": False,
            "risk_enabled": False,
        }],
        smarthooks_id="string")
    
    const smarthooksResource = new onelogin.Smarthooks("smarthooksResource", {
        disabled: false,
        envVars: ["string"],
        "function": "string",
        packages: {
            string: "string",
        },
        retries: 0,
        runtime: "string",
        timeout: 0,
        type: "string",
        conditions: [{
            operator: "string",
            source: "string",
            value: "string",
        }],
        contextVersion: "string",
        options: [{
            locationEnabled: false,
            mfaDeviceInfoEnabled: false,
            riskEnabled: false,
        }],
        smarthooksId: "string",
    });
    
    type: onelogin:Smarthooks
    properties:
        conditions:
            - operator: string
              source: string
              value: string
        contextVersion: string
        disabled: false
        envVars:
            - string
        function: string
        options:
            - locationEnabled: false
              mfaDeviceInfoEnabled: false
              riskEnabled: false
        packages:
            string: string
        retries: 0
        runtime: string
        smarthooksId: string
        timeout: 0
        type: string
    

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

    Disabled bool
    Indicates if function is available for execution or not. Default true
    EnvVars List<string>
    An array of predefined environment variables to be supplied to the function at runtime.
    Function string
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    Packages Dictionary<string, string>
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    Retries double
    Number of retries if execution fails. Default 0, Max 4
    Runtime string
    Timeout double
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    Type string
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    Conditions List<SmarthooksCondition>
    ContextVersion string
    Options List<SmarthooksOption>
    A list of options for the hook
    SmarthooksId string
    Disabled bool
    Indicates if function is available for execution or not. Default true
    EnvVars []string
    An array of predefined environment variables to be supplied to the function at runtime.
    Function string
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    Packages map[string]string
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    Retries float64
    Number of retries if execution fails. Default 0, Max 4
    Runtime string
    Timeout float64
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    Type string
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    Conditions []SmarthooksConditionArgs
    ContextVersion string
    Options []SmarthooksOptionArgs
    A list of options for the hook
    SmarthooksId string
    disabled Boolean
    Indicates if function is available for execution or not. Default true
    envVars List<String>
    An array of predefined environment variables to be supplied to the function at runtime.
    function String
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    packages Map<String,String>
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    retries Double
    Number of retries if execution fails. Default 0, Max 4
    runtime String
    timeout Double
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    type String
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    conditions List<SmarthooksCondition>
    contextVersion String
    options List<SmarthooksOption>
    A list of options for the hook
    smarthooksId String
    disabled boolean
    Indicates if function is available for execution or not. Default true
    envVars string[]
    An array of predefined environment variables to be supplied to the function at runtime.
    function string
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    packages {[key: string]: string}
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    retries number
    Number of retries if execution fails. Default 0, Max 4
    runtime string
    timeout number
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    type string
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    conditions SmarthooksCondition[]
    contextVersion string
    options SmarthooksOption[]
    A list of options for the hook
    smarthooksId string
    disabled bool
    Indicates if function is available for execution or not. Default true
    env_vars Sequence[str]
    An array of predefined environment variables to be supplied to the function at runtime.
    function str
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    packages Mapping[str, str]
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    retries float
    Number of retries if execution fails. Default 0, Max 4
    runtime str
    timeout float
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    type str
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    conditions Sequence[SmarthooksConditionArgs]
    context_version str
    options Sequence[SmarthooksOptionArgs]
    A list of options for the hook
    smarthooks_id str
    disabled Boolean
    Indicates if function is available for execution or not. Default true
    envVars List<String>
    An array of predefined environment variables to be supplied to the function at runtime.
    function String
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    packages Map<String>
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    retries Number
    Number of retries if execution fails. Default 0, Max 4
    runtime String
    timeout Number
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    type String
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    conditions List<Property Map>
    contextVersion String
    options List<Property Map>
    A list of options for the hook
    smarthooksId String

    Outputs

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

    CreatedAt string
    Timestamp for smarthook's last update
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The smarthook's status.
    UpdatedAt string
    Timestamp for smarthook's last update
    CreatedAt string
    Timestamp for smarthook's last update
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The smarthook's status.
    UpdatedAt string
    Timestamp for smarthook's last update
    createdAt String
    Timestamp for smarthook's last update
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The smarthook's status.
    updatedAt String
    Timestamp for smarthook's last update
    createdAt string
    Timestamp for smarthook's last update
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The smarthook's status.
    updatedAt string
    Timestamp for smarthook's last update
    created_at str
    Timestamp for smarthook's last update
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The smarthook's status.
    updated_at str
    Timestamp for smarthook's last update
    createdAt String
    Timestamp for smarthook's last update
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The smarthook's status.
    updatedAt String
    Timestamp for smarthook's last update

    Look up Existing Smarthooks Resource

    Get an existing Smarthooks 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?: SmarthooksState, opts?: CustomResourceOptions): Smarthooks
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            conditions: Optional[Sequence[SmarthooksConditionArgs]] = None,
            context_version: Optional[str] = None,
            created_at: Optional[str] = None,
            disabled: Optional[bool] = None,
            env_vars: Optional[Sequence[str]] = None,
            function: Optional[str] = None,
            options: Optional[Sequence[SmarthooksOptionArgs]] = None,
            packages: Optional[Mapping[str, str]] = None,
            retries: Optional[float] = None,
            runtime: Optional[str] = None,
            smarthooks_id: Optional[str] = None,
            status: Optional[str] = None,
            timeout: Optional[float] = None,
            type: Optional[str] = None,
            updated_at: Optional[str] = None) -> Smarthooks
    func GetSmarthooks(ctx *Context, name string, id IDInput, state *SmarthooksState, opts ...ResourceOption) (*Smarthooks, error)
    public static Smarthooks Get(string name, Input<string> id, SmarthooksState? state, CustomResourceOptions? opts = null)
    public static Smarthooks get(String name, Output<String> id, SmarthooksState state, CustomResourceOptions options)
    resources:  _:    type: onelogin:Smarthooks    get:      id: ${id}
    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:
    Conditions List<SmarthooksCondition>
    ContextVersion string
    CreatedAt string
    Timestamp for smarthook's last update
    Disabled bool
    Indicates if function is available for execution or not. Default true
    EnvVars List<string>
    An array of predefined environment variables to be supplied to the function at runtime.
    Function string
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    Options List<SmarthooksOption>
    A list of options for the hook
    Packages Dictionary<string, string>
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    Retries double
    Number of retries if execution fails. Default 0, Max 4
    Runtime string
    SmarthooksId string
    Status string
    The smarthook's status.
    Timeout double
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    Type string
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    UpdatedAt string
    Timestamp for smarthook's last update
    Conditions []SmarthooksConditionArgs
    ContextVersion string
    CreatedAt string
    Timestamp for smarthook's last update
    Disabled bool
    Indicates if function is available for execution or not. Default true
    EnvVars []string
    An array of predefined environment variables to be supplied to the function at runtime.
    Function string
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    Options []SmarthooksOptionArgs
    A list of options for the hook
    Packages map[string]string
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    Retries float64
    Number of retries if execution fails. Default 0, Max 4
    Runtime string
    SmarthooksId string
    Status string
    The smarthook's status.
    Timeout float64
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    Type string
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    UpdatedAt string
    Timestamp for smarthook's last update
    conditions List<SmarthooksCondition>
    contextVersion String
    createdAt String
    Timestamp for smarthook's last update
    disabled Boolean
    Indicates if function is available for execution or not. Default true
    envVars List<String>
    An array of predefined environment variables to be supplied to the function at runtime.
    function String
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    options List<SmarthooksOption>
    A list of options for the hook
    packages Map<String,String>
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    retries Double
    Number of retries if execution fails. Default 0, Max 4
    runtime String
    smarthooksId String
    status String
    The smarthook's status.
    timeout Double
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    type String
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    updatedAt String
    Timestamp for smarthook's last update
    conditions SmarthooksCondition[]
    contextVersion string
    createdAt string
    Timestamp for smarthook's last update
    disabled boolean
    Indicates if function is available for execution or not. Default true
    envVars string[]
    An array of predefined environment variables to be supplied to the function at runtime.
    function string
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    options SmarthooksOption[]
    A list of options for the hook
    packages {[key: string]: string}
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    retries number
    Number of retries if execution fails. Default 0, Max 4
    runtime string
    smarthooksId string
    status string
    The smarthook's status.
    timeout number
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    type string
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    updatedAt string
    Timestamp for smarthook's last update
    conditions Sequence[SmarthooksConditionArgs]
    context_version str
    created_at str
    Timestamp for smarthook's last update
    disabled bool
    Indicates if function is available for execution or not. Default true
    env_vars Sequence[str]
    An array of predefined environment variables to be supplied to the function at runtime.
    function str
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    options Sequence[SmarthooksOptionArgs]
    A list of options for the hook
    packages Mapping[str, str]
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    retries float
    Number of retries if execution fails. Default 0, Max 4
    runtime str
    smarthooks_id str
    status str
    The smarthook's status.
    timeout float
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    type str
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    updated_at str
    Timestamp for smarthook's last update
    conditions List<Property Map>
    contextVersion String
    createdAt String
    Timestamp for smarthook's last update
    disabled Boolean
    Indicates if function is available for execution or not. Default true
    envVars List<String>
    An array of predefined environment variables to be supplied to the function at runtime.
    function String
    A base64 encoded blob, or Heredoc string containing the javascript function code.
    options List<Property Map>
    A list of options for the hook
    packages Map<String>
    A list of public npm packages than will be installed as part of the function build process. These packages names must be on our allowlist. See Node Modules section of this doc. Packages can be any version and support the semantic versioning syntax used by NPM.
    retries Number
    Number of retries if execution fails. Default 0, Max 4
    runtime String
    smarthooksId String
    status String
    The smarthook's status.
    timeout Number
    The number of milliseconds to allow before timeout. Default 1000, Max 10000
    type String
    The name of the hook. Must be one of: user-migration pre-authentication pre-user-create post-user-create pre-user-update post-user-update
    updatedAt String
    Timestamp for smarthook's last update

    Supporting Types

    SmarthooksCondition, SmarthooksConditionArgs

    Operator string
    Source string
    Value string
    Operator string
    Source string
    Value string
    operator String
    source String
    value String
    operator string
    source string
    value string
    operator String
    source String
    value String

    SmarthooksOption, SmarthooksOptionArgs

    LocationEnabled bool
    When true an ip to location lookup is done and the location info is passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    MfaDeviceInfoEnabled bool
    RiskEnabled bool
    When true a risk score and risk reasons will be passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    LocationEnabled bool
    When true an ip to location lookup is done and the location info is passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    MfaDeviceInfoEnabled bool
    RiskEnabled bool
    When true a risk score and risk reasons will be passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    locationEnabled Boolean
    When true an ip to location lookup is done and the location info is passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    mfaDeviceInfoEnabled Boolean
    riskEnabled Boolean
    When true a risk score and risk reasons will be passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    locationEnabled boolean
    When true an ip to location lookup is done and the location info is passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    mfaDeviceInfoEnabled boolean
    riskEnabled boolean
    When true a risk score and risk reasons will be passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    location_enabled bool
    When true an ip to location lookup is done and the location info is passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    mfa_device_info_enabled bool
    risk_enabled bool
    When true a risk score and risk reasons will be passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    locationEnabled Boolean
    When true an ip to location lookup is done and the location info is passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false
    mfaDeviceInfoEnabled Boolean
    riskEnabled Boolean
    When true a risk score and risk reasons will be passed in the context. Only applies authentication time hooks. E.g. pre-authentication, user-migration. Default false

    Import

    A SmartHook can be imported via the OneLogin SmartHook.

    $ pulumi import onelogin:index/smarthooks:Smarthooks example <smarthook_id>
    

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

    Package Details

    Repository
    onelogin onelogin/terraform-provider-onelogin
    License
    Notes
    This Pulumi package is based on the onelogin Terraform Provider.
    onelogin logo
    onelogin 0.11.0 published on Friday, Aug 29, 2025 by onelogin