1. Packages
  2. Onelogin Provider
  3. API Docs
  4. Groups
Viewing docs for onelogin 0.12.0
published on Friday, Mar 13, 2026 by onelogin
onelogin logo
Viewing docs for onelogin 0.12.0
published on Friday, Mar 13, 2026 by onelogin

    Manages a OneLogin group. Supports full CRUD operations via the V2 API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as onelogin from "@pulumi/onelogin";
    
    const engineering = new onelogin.Groups("engineering", {
        name: "Engineering",
        reference: "eng-group",
    });
    
    import pulumi
    import pulumi_onelogin as onelogin
    
    engineering = onelogin.Groups("engineering",
        name="Engineering",
        reference="eng-group")
    
    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.NewGroups(ctx, "engineering", &onelogin.GroupsArgs{
    			Name:      pulumi.String("Engineering"),
    			Reference: pulumi.String("eng-group"),
    		})
    		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 engineering = new Onelogin.Groups("engineering", new()
        {
            Name = "Engineering",
            Reference = "eng-group",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.onelogin.Groups;
    import com.pulumi.onelogin.GroupsArgs;
    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 engineering = new Groups("engineering", GroupsArgs.builder()
                .name("Engineering")
                .reference("eng-group")
                .build());
    
        }
    }
    
    resources:
      engineering:
        type: onelogin:Groups
        properties:
          name: Engineering
          reference: eng-group
    

    Create Groups Resource

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

    Constructor syntax

    new Groups(name: string, args?: GroupsArgs, opts?: CustomResourceOptions);
    @overload
    def Groups(resource_name: str,
               args: Optional[GroupsArgs] = None,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Groups(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               name: Optional[str] = None,
               reference: Optional[str] = None)
    func NewGroups(ctx *Context, name string, args *GroupsArgs, opts ...ResourceOption) (*Groups, error)
    public Groups(string name, GroupsArgs? args = null, CustomResourceOptions? opts = null)
    public Groups(String name, GroupsArgs args)
    public Groups(String name, GroupsArgs args, CustomResourceOptions options)
    
    type: onelogin:Groups
    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 GroupsArgs
    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 GroupsArgs
    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 GroupsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GroupsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GroupsArgs
    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 groupsResource = new Onelogin.Groups("groupsResource", new()
    {
        Name = "string",
        Reference = "string",
    });
    
    example, err := onelogin.NewGroups(ctx, "groupsResource", &onelogin.GroupsArgs{
    	Name:      pulumi.String("string"),
    	Reference: pulumi.String("string"),
    })
    
    var groupsResource = new Groups("groupsResource", GroupsArgs.builder()
        .name("string")
        .reference("string")
        .build());
    
    groups_resource = onelogin.Groups("groupsResource",
        name="string",
        reference="string")
    
    const groupsResource = new onelogin.Groups("groupsResource", {
        name: "string",
        reference: "string",
    });
    
    type: onelogin:Groups
    properties:
        name: string
        reference: string
    

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

    Name string
    The name of the group.
    Reference string
    A reference identifier for the group.
    Name string
    The name of the group.
    Reference string
    A reference identifier for the group.
    name String
    The name of the group.
    reference String
    A reference identifier for the group.
    name string
    The name of the group.
    reference string
    A reference identifier for the group.
    name str
    The name of the group.
    reference str
    A reference identifier for the group.
    name String
    The name of the group.
    reference String
    A reference identifier for the group.

    Outputs

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

    Get an existing Groups 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?: GroupsState, opts?: CustomResourceOptions): Groups
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            reference: Optional[str] = None) -> Groups
    func GetGroups(ctx *Context, name string, id IDInput, state *GroupsState, opts ...ResourceOption) (*Groups, error)
    public static Groups Get(string name, Input<string> id, GroupsState? state, CustomResourceOptions? opts = null)
    public static Groups get(String name, Output<String> id, GroupsState state, CustomResourceOptions options)
    resources:  _:    type: onelogin:Groups    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:
    Name string
    The name of the group.
    Reference string
    A reference identifier for the group.
    Name string
    The name of the group.
    Reference string
    A reference identifier for the group.
    name String
    The name of the group.
    reference String
    A reference identifier for the group.
    name string
    The name of the group.
    reference string
    A reference identifier for the group.
    name str
    The name of the group.
    reference str
    A reference identifier for the group.
    name String
    The name of the group.
    reference String
    A reference identifier for the group.

    Import

    Groups can be imported using the group ID:

    $ pulumi import onelogin:index/groups:Groups engineering 123456
    

    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
    Viewing docs for onelogin 0.12.0
    published on Friday, Mar 13, 2026 by onelogin
      Try Pulumi Cloud free. Your team will thank you.