1. Packages
  2. Onelogin Provider
  3. API Docs
  4. Privileges
onelogin 0.5.4 published on Wednesday, Apr 30, 2025 by onelogin

onelogin.Privileges

Explore with Pulumi AI

onelogin logo
onelogin 0.5.4 published on Wednesday, Apr 30, 2025 by onelogin

    Manage Privilege resources.

    This resource allows you to create and configure Privilege.

    Example Usage

    Strict Ordering

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.onelogin.Privileges;
    import com.pulumi.onelogin.PrivilegesArgs;
    import com.pulumi.onelogin.inputs.PrivilegesPrivilegeArgs;
    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 superAdmin = new Privileges("superAdmin", PrivilegesArgs.builder()
                .description("description")
                .privileges(PrivilegesPrivilegeArgs.builder()
                    .statements(                
                        PrivilegesPrivilegeStatementArgs.builder()
                            .action("apps:List")
                            .effect("Allow")
                            .scope("*")
                            .build(),
                        PrivilegesPrivilegeStatementArgs.builder()
                            .action(                        
                                "users:List",
                                "users:Update")
                            .effect("Allow")
                            .scope(                        
                                "users/123",
                                "users/345")
                            .build())
                    .build())
                .roleIds(            
                    987,
                    654)
                .userIds(            
                    123,
                    345)
                .build());
    
        }
    }
    
    resources:
      superAdmin:
        type: onelogin:Privileges
        properties:
          description: description
          privileges:
            - statements:
                - action:
                    - apps:List
                  effect: Allow
                  scope:
                    - '*'
                - action:
                    - users:List
                    - users:Update
                  effect: Allow
                  scope:
                    - users/123
                    - users/345
          roleIds:
            - 987
            - 654
          userIds:
            - 123
            - 345
    

    Create Privileges Resource

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

    Constructor syntax

    new Privileges(name: string, args: PrivilegesArgs, opts?: CustomResourceOptions);
    @overload
    def Privileges(resource_name: str,
                   args: PrivilegesArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Privileges(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   privileges: Optional[Sequence[PrivilegesPrivilegeArgs]] = None,
                   description: Optional[str] = None,
                   name: Optional[str] = None,
                   privileges_id: Optional[str] = None,
                   role_ids: Optional[Sequence[float]] = None,
                   user_ids: Optional[Sequence[float]] = None)
    func NewPrivileges(ctx *Context, name string, args PrivilegesArgs, opts ...ResourceOption) (*Privileges, error)
    public Privileges(string name, PrivilegesArgs args, CustomResourceOptions? opts = null)
    public Privileges(String name, PrivilegesArgs args)
    public Privileges(String name, PrivilegesArgs args, CustomResourceOptions options)
    
    type: onelogin:Privileges
    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 PrivilegesArgs
    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 PrivilegesArgs
    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 PrivilegesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrivilegesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrivilegesArgs
    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 privilegesResource = new Onelogin.Privileges("privilegesResource", new()
    {
        Privileges = new[]
        {
            new Onelogin.Inputs.PrivilegesPrivilegeArgs
            {
                Statements = new[]
                {
                    new Onelogin.Inputs.PrivilegesPrivilegeStatementArgs
                    {
                        Actions = new[]
                        {
                            "string",
                        },
                        Effect = "string",
                        Scopes = new[]
                        {
                            "string",
                        },
                    },
                },
                Version = "string",
            },
        },
        Description = "string",
        Name = "string",
        PrivilegesId = "string",
        RoleIds = new[]
        {
            0,
        },
        UserIds = new[]
        {
            0,
        },
    });
    
    example, err := onelogin.NewPrivileges(ctx, "privilegesResource", &onelogin.PrivilegesArgs{
    	Privileges: onelogin.PrivilegesPrivilegeArray{
    		&onelogin.PrivilegesPrivilegeArgs{
    			Statements: onelogin.PrivilegesPrivilegeStatementArray{
    				&onelogin.PrivilegesPrivilegeStatementArgs{
    					Actions: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					Effect: pulumi.String("string"),
    					Scopes: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    			Version: pulumi.String("string"),
    		},
    	},
    	Description:  pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	PrivilegesId: pulumi.String("string"),
    	RoleIds: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	UserIds: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    })
    
    var privilegesResource = new Privileges("privilegesResource", PrivilegesArgs.builder()
        .privileges(PrivilegesPrivilegeArgs.builder()
            .statements(PrivilegesPrivilegeStatementArgs.builder()
                .actions("string")
                .effect("string")
                .scopes("string")
                .build())
            .version("string")
            .build())
        .description("string")
        .name("string")
        .privilegesId("string")
        .roleIds(0)
        .userIds(0)
        .build());
    
    privileges_resource = onelogin.Privileges("privilegesResource",
        privileges=[{
            "statements": [{
                "actions": ["string"],
                "effect": "string",
                "scopes": ["string"],
            }],
            "version": "string",
        }],
        description="string",
        name="string",
        privileges_id="string",
        role_ids=[0],
        user_ids=[0])
    
    const privilegesResource = new onelogin.Privileges("privilegesResource", {
        privileges: [{
            statements: [{
                actions: ["string"],
                effect: "string",
                scopes: ["string"],
            }],
            version: "string",
        }],
        description: "string",
        name: "string",
        privilegesId: "string",
        roleIds: [0],
        userIds: [0],
    });
    
    type: onelogin:Privileges
    properties:
        description: string
        name: string
        privileges:
            - statements:
                - actions:
                    - string
                  effect: string
                  scopes:
                    - string
              version: string
        privilegesId: string
        roleIds:
            - 0
        userIds:
            - 0
    

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

    Privileges List<PrivilegesPrivilege>
    A list of statements that describe what the privilege grants access to.
    Description string
    Description for the Privilege.
    Name string
    The name of the privilege.
    PrivilegesId string
    RoleIds List<double>
    A list of role IDs for whom the role applies.
    UserIds List<double>
    A list of user IDs for whom the privilege applies.
    Privileges []PrivilegesPrivilegeArgs
    A list of statements that describe what the privilege grants access to.
    Description string
    Description for the Privilege.
    Name string
    The name of the privilege.
    PrivilegesId string
    RoleIds []float64
    A list of role IDs for whom the role applies.
    UserIds []float64
    A list of user IDs for whom the privilege applies.
    privileges List<PrivilegesPrivilege>
    A list of statements that describe what the privilege grants access to.
    description String
    Description for the Privilege.
    name String
    The name of the privilege.
    privilegesId String
    roleIds List<Double>
    A list of role IDs for whom the role applies.
    userIds List<Double>
    A list of user IDs for whom the privilege applies.
    privileges PrivilegesPrivilege[]
    A list of statements that describe what the privilege grants access to.
    description string
    Description for the Privilege.
    name string
    The name of the privilege.
    privilegesId string
    roleIds number[]
    A list of role IDs for whom the role applies.
    userIds number[]
    A list of user IDs for whom the privilege applies.
    privileges Sequence[PrivilegesPrivilegeArgs]
    A list of statements that describe what the privilege grants access to.
    description str
    Description for the Privilege.
    name str
    The name of the privilege.
    privileges_id str
    role_ids Sequence[float]
    A list of role IDs for whom the role applies.
    user_ids Sequence[float]
    A list of user IDs for whom the privilege applies.
    privileges List<Property Map>
    A list of statements that describe what the privilege grants access to.
    description String
    Description for the Privilege.
    name String
    The name of the privilege.
    privilegesId String
    roleIds List<Number>
    A list of role IDs for whom the role applies.
    userIds List<Number>
    A list of user IDs for whom the privilege applies.

    Outputs

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

    Get an existing Privileges 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?: PrivilegesState, opts?: CustomResourceOptions): Privileges
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            privileges: Optional[Sequence[PrivilegesPrivilegeArgs]] = None,
            privileges_id: Optional[str] = None,
            role_ids: Optional[Sequence[float]] = None,
            user_ids: Optional[Sequence[float]] = None) -> Privileges
    func GetPrivileges(ctx *Context, name string, id IDInput, state *PrivilegesState, opts ...ResourceOption) (*Privileges, error)
    public static Privileges Get(string name, Input<string> id, PrivilegesState? state, CustomResourceOptions? opts = null)
    public static Privileges get(String name, Output<String> id, PrivilegesState state, CustomResourceOptions options)
    resources:  _:    type: onelogin:Privileges    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:
    Description string
    Description for the Privilege.
    Name string
    The name of the privilege.
    Privileges List<PrivilegesPrivilege>
    A list of statements that describe what the privilege grants access to.
    PrivilegesId string
    RoleIds List<double>
    A list of role IDs for whom the role applies.
    UserIds List<double>
    A list of user IDs for whom the privilege applies.
    Description string
    Description for the Privilege.
    Name string
    The name of the privilege.
    Privileges []PrivilegesPrivilegeArgs
    A list of statements that describe what the privilege grants access to.
    PrivilegesId string
    RoleIds []float64
    A list of role IDs for whom the role applies.
    UserIds []float64
    A list of user IDs for whom the privilege applies.
    description String
    Description for the Privilege.
    name String
    The name of the privilege.
    privileges List<PrivilegesPrivilege>
    A list of statements that describe what the privilege grants access to.
    privilegesId String
    roleIds List<Double>
    A list of role IDs for whom the role applies.
    userIds List<Double>
    A list of user IDs for whom the privilege applies.
    description string
    Description for the Privilege.
    name string
    The name of the privilege.
    privileges PrivilegesPrivilege[]
    A list of statements that describe what the privilege grants access to.
    privilegesId string
    roleIds number[]
    A list of role IDs for whom the role applies.
    userIds number[]
    A list of user IDs for whom the privilege applies.
    description str
    Description for the Privilege.
    name str
    The name of the privilege.
    privileges Sequence[PrivilegesPrivilegeArgs]
    A list of statements that describe what the privilege grants access to.
    privileges_id str
    role_ids Sequence[float]
    A list of role IDs for whom the role applies.
    user_ids Sequence[float]
    A list of user IDs for whom the privilege applies.
    description String
    Description for the Privilege.
    name String
    The name of the privilege.
    privileges List<Property Map>
    A list of statements that describe what the privilege grants access to.
    privilegesId String
    roleIds List<Number>
    A list of role IDs for whom the role applies.
    userIds List<Number>
    A list of user IDs for whom the privilege applies.

    Supporting Types

    PrivilegesPrivilege, PrivilegesPrivilegeArgs

    Statements List<PrivilegesPrivilegeStatement>
    At least one statement is required. Statements describe the effect granted to a resource type. In this case it allow's the privilege holder to lisst apps and users.
    Version string
    Statements []PrivilegesPrivilegeStatement
    At least one statement is required. Statements describe the effect granted to a resource type. In this case it allow's the privilege holder to lisst apps and users.
    Version string
    statements List<PrivilegesPrivilegeStatement>
    At least one statement is required. Statements describe the effect granted to a resource type. In this case it allow's the privilege holder to lisst apps and users.
    version String
    statements PrivilegesPrivilegeStatement[]
    At least one statement is required. Statements describe the effect granted to a resource type. In this case it allow's the privilege holder to lisst apps and users.
    version string
    statements Sequence[PrivilegesPrivilegeStatement]
    At least one statement is required. Statements describe the effect granted to a resource type. In this case it allow's the privilege holder to lisst apps and users.
    version str
    statements List<Property Map>
    At least one statement is required. Statements describe the effect granted to a resource type. In this case it allow's the privilege holder to lisst apps and users.
    version String

    PrivilegesPrivilegeStatement, PrivilegesPrivilegeStatementArgs

    Actions List<string>
    List of actions the privilege holder can do. Must be one of those listed in the docs
    Effect string
    The effect the privilege grants for the resource. Must be "Allow".
    Scopes List<string>
    Target the privileged action against specific resources with the scope. In this case, the privilege only grants update access to users 123 and 345.
    Actions []string
    List of actions the privilege holder can do. Must be one of those listed in the docs
    Effect string
    The effect the privilege grants for the resource. Must be "Allow".
    Scopes []string
    Target the privileged action against specific resources with the scope. In this case, the privilege only grants update access to users 123 and 345.
    actions List<String>
    List of actions the privilege holder can do. Must be one of those listed in the docs
    effect String
    The effect the privilege grants for the resource. Must be "Allow".
    scopes List<String>
    Target the privileged action against specific resources with the scope. In this case, the privilege only grants update access to users 123 and 345.
    actions string[]
    List of actions the privilege holder can do. Must be one of those listed in the docs
    effect string
    The effect the privilege grants for the resource. Must be "Allow".
    scopes string[]
    Target the privileged action against specific resources with the scope. In this case, the privilege only grants update access to users 123 and 345.
    actions Sequence[str]
    List of actions the privilege holder can do. Must be one of those listed in the docs
    effect str
    The effect the privilege grants for the resource. Must be "Allow".
    scopes Sequence[str]
    Target the privileged action against specific resources with the scope. In this case, the privilege only grants update access to users 123 and 345.
    actions List<String>
    List of actions the privilege holder can do. Must be one of those listed in the docs
    effect String
    The effect the privilege grants for the resource. Must be "Allow".
    scopes List<String>
    Target the privileged action against specific resources with the scope. In this case, the privilege only grants update access to users 123 and 345.

    Import

    A privilege can be imported using the OneLogin Privilege ID.

    $ pulumi import onelogin:index/privileges:Privileges super_admin <privilege 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.5.4 published on Wednesday, Apr 30, 2025 by onelogin