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

onelogin.UserMappings

Explore with Pulumi AI

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

    NOTE: This resource is currently disabled as it is not compatible with OneLogin SDK v4. It will be re-enabled in a future release when the SDK adds support for user mappings.

    Manage User Mappings resources.

    This resource allows you to create and configure User Mappings.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as onelogin from "@pulumi/onelogin";
    
    const example = new onelogin.UserMappings("example", {
        actions: [{
            action: "set_status",
            values: ["1"],
        }],
        conditions: [{
            operator: ">",
            source: "last_login",
            value: "90",
        }],
        enabled: true,
        match: "all",
        position: 1,
    });
    
    import pulumi
    import pulumi_onelogin as onelogin
    
    example = onelogin.UserMappings("example",
        actions=[{
            "action": "set_status",
            "values": ["1"],
        }],
        conditions=[{
            "operator": ">",
            "source": "last_login",
            "value": "90",
        }],
        enabled=True,
        match="all",
        position=1)
    
    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.NewUserMappings(ctx, "example", &onelogin.UserMappingsArgs{
    			Actions: onelogin.UserMappingsActionArray{
    				&onelogin.UserMappingsActionArgs{
    					Action: pulumi.String("set_status"),
    					Values: pulumi.StringArray{
    						pulumi.String("1"),
    					},
    				},
    			},
    			Conditions: onelogin.UserMappingsConditionArray{
    				&onelogin.UserMappingsConditionArgs{
    					Operator: pulumi.String(">"),
    					Source:   pulumi.String("last_login"),
    					Value:    pulumi.String("90"),
    				},
    			},
    			Enabled:  pulumi.Bool(true),
    			Match:    pulumi.String("all"),
    			Position: pulumi.Float64(1),
    		})
    		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 example = new Onelogin.UserMappings("example", new()
        {
            Actions = new[]
            {
                new Onelogin.Inputs.UserMappingsActionArgs
                {
                    Action = "set_status",
                    Values = new[]
                    {
                        "1",
                    },
                },
            },
            Conditions = new[]
            {
                new Onelogin.Inputs.UserMappingsConditionArgs
                {
                    Operator = ">",
                    Source = "last_login",
                    Value = "90",
                },
            },
            Enabled = true,
            Match = "all",
            Position = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.onelogin.UserMappings;
    import com.pulumi.onelogin.UserMappingsArgs;
    import com.pulumi.onelogin.inputs.UserMappingsActionArgs;
    import com.pulumi.onelogin.inputs.UserMappingsConditionArgs;
    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 example = new UserMappings("example", UserMappingsArgs.builder()
                .actions(UserMappingsActionArgs.builder()
                    .action("set_status")
                    .values("1")
                    .build())
                .conditions(UserMappingsConditionArgs.builder()
                    .operator(">")
                    .source("last_login")
                    .value("90")
                    .build())
                .enabled(true)
                .match("all")
                .position(1)
                .build());
    
        }
    }
    
    resources:
      example:
        type: onelogin:UserMappings
        properties:
          actions:
            - action: set_status
              values:
                - '1'
          conditions:
            - operator: '>'
              source: last_login
              value: '90'
          enabled: true
          match: all
          position: 1
    

    Create UserMappings Resource

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

    Constructor syntax

    new UserMappings(name: string, args: UserMappingsArgs, opts?: CustomResourceOptions);
    @overload
    def UserMappings(resource_name: str,
                     args: UserMappingsArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def UserMappings(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     match: Optional[str] = None,
                     actions: Optional[Sequence[UserMappingsActionArgs]] = None,
                     conditions: Optional[Sequence[UserMappingsConditionArgs]] = None,
                     enabled: Optional[bool] = None,
                     name: Optional[str] = None,
                     position: Optional[float] = None,
                     user_mappings_id: Optional[str] = None)
    func NewUserMappings(ctx *Context, name string, args UserMappingsArgs, opts ...ResourceOption) (*UserMappings, error)
    public UserMappings(string name, UserMappingsArgs args, CustomResourceOptions? opts = null)
    public UserMappings(String name, UserMappingsArgs args)
    public UserMappings(String name, UserMappingsArgs args, CustomResourceOptions options)
    
    type: onelogin:UserMappings
    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 UserMappingsArgs
    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 UserMappingsArgs
    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 UserMappingsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserMappingsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserMappingsArgs
    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 userMappingsResource = new Onelogin.UserMappings("userMappingsResource", new()
    {
        Match = "string",
        Actions = new[]
        {
            new Onelogin.Inputs.UserMappingsActionArgs
            {
                Action = "string",
                Values = new[]
                {
                    "string",
                },
            },
        },
        Conditions = new[]
        {
            new Onelogin.Inputs.UserMappingsConditionArgs
            {
                Operator = "string",
                Source = "string",
                Value = "string",
            },
        },
        Enabled = false,
        Name = "string",
        Position = 0,
        UserMappingsId = "string",
    });
    
    example, err := onelogin.NewUserMappings(ctx, "userMappingsResource", &onelogin.UserMappingsArgs{
    	Match: pulumi.String("string"),
    	Actions: onelogin.UserMappingsActionArray{
    		&onelogin.UserMappingsActionArgs{
    			Action: pulumi.String("string"),
    			Values: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Conditions: onelogin.UserMappingsConditionArray{
    		&onelogin.UserMappingsConditionArgs{
    			Operator: pulumi.String("string"),
    			Source:   pulumi.String("string"),
    			Value:    pulumi.String("string"),
    		},
    	},
    	Enabled:        pulumi.Bool(false),
    	Name:           pulumi.String("string"),
    	Position:       pulumi.Float64(0),
    	UserMappingsId: pulumi.String("string"),
    })
    
    var userMappingsResource = new UserMappings("userMappingsResource", UserMappingsArgs.builder()
        .match("string")
        .actions(UserMappingsActionArgs.builder()
            .action("string")
            .values("string")
            .build())
        .conditions(UserMappingsConditionArgs.builder()
            .operator("string")
            .source("string")
            .value("string")
            .build())
        .enabled(false)
        .name("string")
        .position(0.0)
        .userMappingsId("string")
        .build());
    
    user_mappings_resource = onelogin.UserMappings("userMappingsResource",
        match="string",
        actions=[{
            "action": "string",
            "values": ["string"],
        }],
        conditions=[{
            "operator": "string",
            "source": "string",
            "value": "string",
        }],
        enabled=False,
        name="string",
        position=0,
        user_mappings_id="string")
    
    const userMappingsResource = new onelogin.UserMappings("userMappingsResource", {
        match: "string",
        actions: [{
            action: "string",
            values: ["string"],
        }],
        conditions: [{
            operator: "string",
            source: "string",
            value: "string",
        }],
        enabled: false,
        name: "string",
        position: 0,
        userMappingsId: "string",
    });
    
    type: onelogin:UserMappings
    properties:
        actions:
            - action: string
              values:
                - string
        conditions:
            - operator: string
              source: string
              value: string
        enabled: false
        match: string
        name: string
        position: 0
        userMappingsId: string
    

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

    Match string
    Indicates how conditions should be matched. Must be one of all or any.
    Actions List<UserMappingsAction>
    The number of minutes until the token expires
    Conditions List<UserMappingsCondition>
    An array of conditions that the user must meet in order for the mapping to be applied.
    Enabled bool
    Indicates if a mapping is enabled.
    Name string
    The resource's name.
    Position double
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    UserMappingsId string
    Match string
    Indicates how conditions should be matched. Must be one of all or any.
    Actions []UserMappingsActionArgs
    The number of minutes until the token expires
    Conditions []UserMappingsConditionArgs
    An array of conditions that the user must meet in order for the mapping to be applied.
    Enabled bool
    Indicates if a mapping is enabled.
    Name string
    The resource's name.
    Position float64
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    UserMappingsId string
    match String
    Indicates how conditions should be matched. Must be one of all or any.
    actions List<UserMappingsAction>
    The number of minutes until the token expires
    conditions List<UserMappingsCondition>
    An array of conditions that the user must meet in order for the mapping to be applied.
    enabled Boolean
    Indicates if a mapping is enabled.
    name String
    The resource's name.
    position Double
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    userMappingsId String
    match string
    Indicates how conditions should be matched. Must be one of all or any.
    actions UserMappingsAction[]
    The number of minutes until the token expires
    conditions UserMappingsCondition[]
    An array of conditions that the user must meet in order for the mapping to be applied.
    enabled boolean
    Indicates if a mapping is enabled.
    name string
    The resource's name.
    position number
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    userMappingsId string
    match str
    Indicates how conditions should be matched. Must be one of all or any.
    actions Sequence[UserMappingsActionArgs]
    The number of minutes until the token expires
    conditions Sequence[UserMappingsConditionArgs]
    An array of conditions that the user must meet in order for the mapping to be applied.
    enabled bool
    Indicates if a mapping is enabled.
    name str
    The resource's name.
    position float
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    user_mappings_id str
    match String
    Indicates how conditions should be matched. Must be one of all or any.
    actions List<Property Map>
    The number of minutes until the token expires
    conditions List<Property Map>
    An array of conditions that the user must meet in order for the mapping to be applied.
    enabled Boolean
    Indicates if a mapping is enabled.
    name String
    The resource's name.
    position Number
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    userMappingsId String

    Outputs

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

    Get an existing UserMappings 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?: UserMappingsState, opts?: CustomResourceOptions): UserMappings
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[Sequence[UserMappingsActionArgs]] = None,
            conditions: Optional[Sequence[UserMappingsConditionArgs]] = None,
            enabled: Optional[bool] = None,
            match: Optional[str] = None,
            name: Optional[str] = None,
            position: Optional[float] = None,
            user_mappings_id: Optional[str] = None) -> UserMappings
    func GetUserMappings(ctx *Context, name string, id IDInput, state *UserMappingsState, opts ...ResourceOption) (*UserMappings, error)
    public static UserMappings Get(string name, Input<string> id, UserMappingsState? state, CustomResourceOptions? opts = null)
    public static UserMappings get(String name, Output<String> id, UserMappingsState state, CustomResourceOptions options)
    resources:  _:    type: onelogin:UserMappings    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:
    Actions List<UserMappingsAction>
    The number of minutes until the token expires
    Conditions List<UserMappingsCondition>
    An array of conditions that the user must meet in order for the mapping to be applied.
    Enabled bool
    Indicates if a mapping is enabled.
    Match string
    Indicates how conditions should be matched. Must be one of all or any.
    Name string
    The resource's name.
    Position double
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    UserMappingsId string
    Actions []UserMappingsActionArgs
    The number of minutes until the token expires
    Conditions []UserMappingsConditionArgs
    An array of conditions that the user must meet in order for the mapping to be applied.
    Enabled bool
    Indicates if a mapping is enabled.
    Match string
    Indicates how conditions should be matched. Must be one of all or any.
    Name string
    The resource's name.
    Position float64
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    UserMappingsId string
    actions List<UserMappingsAction>
    The number of minutes until the token expires
    conditions List<UserMappingsCondition>
    An array of conditions that the user must meet in order for the mapping to be applied.
    enabled Boolean
    Indicates if a mapping is enabled.
    match String
    Indicates how conditions should be matched. Must be one of all or any.
    name String
    The resource's name.
    position Double
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    userMappingsId String
    actions UserMappingsAction[]
    The number of minutes until the token expires
    conditions UserMappingsCondition[]
    An array of conditions that the user must meet in order for the mapping to be applied.
    enabled boolean
    Indicates if a mapping is enabled.
    match string
    Indicates how conditions should be matched. Must be one of all or any.
    name string
    The resource's name.
    position number
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    userMappingsId string
    actions Sequence[UserMappingsActionArgs]
    The number of minutes until the token expires
    conditions Sequence[UserMappingsConditionArgs]
    An array of conditions that the user must meet in order for the mapping to be applied.
    enabled bool
    Indicates if a mapping is enabled.
    match str
    Indicates how conditions should be matched. Must be one of all or any.
    name str
    The resource's name.
    position float
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    user_mappings_id str
    actions List<Property Map>
    The number of minutes until the token expires
    conditions List<Property Map>
    An array of conditions that the user must meet in order for the mapping to be applied.
    enabled Boolean
    Indicates if a mapping is enabled.
    match String
    Indicates how conditions should be matched. Must be one of all or any.
    name String
    The resource's name.
    position Number
    Indicates the ordering of the mapping. When not supplied the mapping will be put at the end of the list on create and managed by the provider. '0' can be supplied to consistently push this mapping to the end of the list on every update.
    userMappingsId String

    Supporting Types

    UserMappingsAction, UserMappingsActionArgs

    Action string
    The action to apply. See List Actions for possible values.
    Values List<string>
    An array of strings. Items in the array will be a plain text string or valid value for the selected action. See List Action Values for possible values. In most cases only a single item will be accepted in the array.
    Action string
    The action to apply. See List Actions for possible values.
    Values []string
    An array of strings. Items in the array will be a plain text string or valid value for the selected action. See List Action Values for possible values. In most cases only a single item will be accepted in the array.
    action String
    The action to apply. See List Actions for possible values.
    values List<String>
    An array of strings. Items in the array will be a plain text string or valid value for the selected action. See List Action Values for possible values. In most cases only a single item will be accepted in the array.
    action string
    The action to apply. See List Actions for possible values.
    values string[]
    An array of strings. Items in the array will be a plain text string or valid value for the selected action. See List Action Values for possible values. In most cases only a single item will be accepted in the array.
    action str
    The action to apply. See List Actions for possible values.
    values Sequence[str]
    An array of strings. Items in the array will be a plain text string or valid value for the selected action. See List Action Values for possible values. In most cases only a single item will be accepted in the array.
    action String
    The action to apply. See List Actions for possible values.
    values List<String>
    An array of strings. Items in the array will be a plain text string or valid value for the selected action. See List Action Values for possible values. In most cases only a single item will be accepted in the array.

    UserMappingsCondition, UserMappingsConditionArgs

    Operator string
    A valid operator for the selected condition source. See List Condition Operators for possible values.
    Source string
    The source field to check. See List Conditions for possible values.
    Value string
    A plain text string or valid value for the selected condition source. See List Condition Values for possible values.
    Operator string
    A valid operator for the selected condition source. See List Condition Operators for possible values.
    Source string
    The source field to check. See List Conditions for possible values.
    Value string
    A plain text string or valid value for the selected condition source. See List Condition Values for possible values.
    operator String
    A valid operator for the selected condition source. See List Condition Operators for possible values.
    source String
    The source field to check. See List Conditions for possible values.
    value String
    A plain text string or valid value for the selected condition source. See List Condition Values for possible values.
    operator string
    A valid operator for the selected condition source. See List Condition Operators for possible values.
    source string
    The source field to check. See List Conditions for possible values.
    value string
    A plain text string or valid value for the selected condition source. See List Condition Values for possible values.
    operator str
    A valid operator for the selected condition source. See List Condition Operators for possible values.
    source str
    The source field to check. See List Conditions for possible values.
    value str
    A plain text string or valid value for the selected condition source. See List Condition Values for possible values.
    operator String
    A valid operator for the selected condition source. See List Condition Operators for possible values.
    source String
    The source field to check. See List Conditions for possible values.
    value String
    A plain text string or valid value for the selected condition source. See List Condition Values for possible values.

    Import

    A User Mapping can be imported via the OneLogin User Mapping.

    $ pulumi import onelogin:index/userMappings:UserMappings example <user_mapping_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