onelogin

v0.3.0 published on Wednesday, Jun 1, 2022 by Pulumi

UserMapping

Manage User Mappings resources.

This resource allows you to create and configure User Mappings.

Example Usage

using Pulumi;
using Onelogin = Pulumi.Onelogin;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Onelogin.UserMapping("example", new Onelogin.UserMappingArgs
        {
            Actions = 
            {
                new Onelogin.Inputs.UserMappingActionArgs
                {
                    Action = "set_status",
                    Values = 
                    {
                        "1",
                    },
                },
            },
            Conditions = 
            {
                new Onelogin.Inputs.UserMappingConditionArgs
                {
                    Operator = ">",
                    Source = "last_login",
                    Value = "90",
                },
            },
            Enabled = true,
            Match = "all",
            Position = 1,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-onelogin/sdk/go/onelogin"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := onelogin.NewUserMapping(ctx, "example", &onelogin.UserMappingArgs{
			Actions: UserMappingActionArray{
				&UserMappingActionArgs{
					Action: pulumi.String("set_status"),
					Values: pulumi.StringArray{
						pulumi.String("1"),
					},
				},
			},
			Conditions: UserMappingConditionArray{
				&UserMappingConditionArgs{
					Operator: pulumi.String(">"),
					Source:   pulumi.String("last_login"),
					Value:    pulumi.String("90"),
				},
			},
			Enabled:  pulumi.Bool(true),
			Match:    pulumi.String("all"),
			Position: pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_onelogin as onelogin

example = onelogin.UserMapping("example",
    actions=[onelogin.UserMappingActionArgs(
        action="set_status",
        values=["1"],
    )],
    conditions=[onelogin.UserMappingConditionArgs(
        operator=">",
        source="last_login",
        value="90",
    )],
    enabled=True,
    match="all",
    position=1)
import * as pulumi from "@pulumi/pulumi";
import * as onelogin from "@pulumi/onelogin";

const example = new onelogin.UserMapping("example", {
    actions: [{
        action: "set_status",
        values: ["1"],
    }],
    conditions: [{
        operator: ">",
        source: "last_login",
        value: "90",
    }],
    enabled: true,
    match: "all",
    position: 1,
});

Coming soon!

Create UserMapping Resource

new UserMapping(name: string, args: UserMappingArgs, opts?: CustomResourceOptions);
@overload
def UserMapping(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                actions: Optional[Sequence[UserMappingActionArgs]] = None,
                conditions: Optional[Sequence[UserMappingConditionArgs]] = None,
                enabled: Optional[bool] = None,
                match: Optional[str] = None,
                name: Optional[str] = None,
                position: Optional[int] = None)
@overload
def UserMapping(resource_name: str,
                args: UserMappingArgs,
                opts: Optional[ResourceOptions] = None)
func NewUserMapping(ctx *Context, name string, args UserMappingArgs, opts ...ResourceOption) (*UserMapping, error)
public UserMapping(string name, UserMappingArgs args, CustomResourceOptions? opts = null)
public UserMapping(String name, UserMappingArgs args)
public UserMapping(String name, UserMappingArgs args, CustomResourceOptions options)
type: onelogin:UserMapping
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args UserMappingArgs
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 UserMappingArgs
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 UserMappingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args UserMappingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args UserMappingArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Match string

Indicates how conditions should be matched. Must be one of all or any.

Actions List<UserMappingActionArgs>

The number of minutes until the token expires

Conditions List<UserMappingConditionArgs>

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 int

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.

Match string

Indicates how conditions should be matched. Must be one of all or any.

Actions []UserMappingActionArgs

The number of minutes until the token expires

Conditions []UserMappingConditionArgs

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 int

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.

match String

Indicates how conditions should be matched. Must be one of all or any.

actions List<UserMappingActionArgs>

The number of minutes until the token expires

conditions List<UserMappingConditionArgs>

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 Integer

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.

match string

Indicates how conditions should be matched. Must be one of all or any.

actions UserMappingActionArgs[]

The number of minutes until the token expires

conditions UserMappingConditionArgs[]

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.

match str

Indicates how conditions should be matched. Must be one of all or any.

actions Sequence[UserMappingActionArgs]

The number of minutes until the token expires

conditions Sequence[UserMappingConditionArgs]

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 int

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.

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.

Outputs

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

Get an existing UserMapping 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?: UserMappingState, opts?: CustomResourceOptions): UserMapping
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        actions: Optional[Sequence[UserMappingActionArgs]] = None,
        conditions: Optional[Sequence[UserMappingConditionArgs]] = None,
        enabled: Optional[bool] = None,
        match: Optional[str] = None,
        name: Optional[str] = None,
        position: Optional[int] = None) -> UserMapping
func GetUserMapping(ctx *Context, name string, id IDInput, state *UserMappingState, opts ...ResourceOption) (*UserMapping, error)
public static UserMapping Get(string name, Input<string> id, UserMappingState? state, CustomResourceOptions? opts = null)
public static UserMapping get(String name, Output<String> id, UserMappingState 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 List<UserMappingActionArgs>

The number of minutes until the token expires

Conditions List<UserMappingConditionArgs>

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 int

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.

Actions []UserMappingActionArgs

The number of minutes until the token expires

Conditions []UserMappingConditionArgs

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 int

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.

actions List<UserMappingActionArgs>

The number of minutes until the token expires

conditions List<UserMappingConditionArgs>

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 Integer

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.

actions UserMappingActionArgs[]

The number of minutes until the token expires

conditions UserMappingConditionArgs[]

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.

actions Sequence[UserMappingActionArgs]

The number of minutes until the token expires

conditions Sequence[UserMappingConditionArgs]

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 int

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.

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.

Supporting Types

UserMappingAction

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.

UserMappingCondition

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

Import

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

 $ pulumi import onelogin:index/userMapping:UserMapping example <user_mapping_id>

Package Details

Repository
https://github.com/pulumi/pulumi-onelogin
License
Apache-2.0
Notes

This Pulumi package is based on the onelogin Terraform Provider.