Viewing docs for onelogin 0.12.0
published on Friday, Mar 13, 2026 by onelogin
published on Friday, Mar 13, 2026 by onelogin
Viewing docs for onelogin 0.12.0
published on Friday, Mar 13, 2026 by onelogin
published on Friday, Mar 13, 2026 by onelogin
# onelogin.Groups Data Source
Use this data source to get a list of all OneLogin groups.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as onelogin from "@pulumi/onelogin";
const all = onelogin.getGroups({});
export const allGroups = all.then(all => all.groups);
export const firstGroupName = all.then(all => all.groups?.[0]?.name);
import pulumi
import pulumi_onelogin as onelogin
all = onelogin.get_groups()
pulumi.export("allGroups", all.groups)
pulumi.export("firstGroupName", all.groups[0].name)
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 {
all, err := onelogin.LookupGroups(ctx, &onelogin.LookupGroupsArgs{}, nil)
if err != nil {
return err
}
ctx.Export("allGroups", all.Groups)
ctx.Export("firstGroupName", all.Groups[0].Name)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Onelogin = Pulumi.Onelogin;
return await Deployment.RunAsync(() =>
{
var all = Onelogin.GetGroups.Invoke();
return new Dictionary<string, object?>
{
["allGroups"] = all.Apply(getGroupsResult => getGroupsResult.Groups),
["firstGroupName"] = all.Apply(getGroupsResult => getGroupsResult.Groups[0]?.Name),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.onelogin.OneloginFunctions;
import com.pulumi.onelogin.inputs.GetGroupsArgs;
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) {
final var all = OneloginFunctions.getGroups(GetGroupsArgs.builder()
.build());
ctx.export("allGroups", all.groups());
ctx.export("firstGroupName", all.groups()[0].name());
}
}
variables:
all:
fn::invoke:
function: onelogin:getGroups
arguments: {}
outputs:
allGroups: ${all.groups}
firstGroupName: ${all.groups[0].name}
Using getGroups
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getGroups(args: GetGroupsArgs, opts?: InvokeOptions): Promise<GetGroupsResult>
function getGroupsOutput(args: GetGroupsOutputArgs, opts?: InvokeOptions): Output<GetGroupsResult>def get_groups(id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGroupsResult
def get_groups_output(id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGroupsResult]func LookupGroups(ctx *Context, args *LookupGroupsArgs, opts ...InvokeOption) (*LookupGroupsResult, error)
func LookupGroupsOutput(ctx *Context, args *LookupGroupsOutputArgs, opts ...InvokeOption) LookupGroupsResultOutput> Note: This function is named LookupGroups in the Go SDK.
public static class GetGroups
{
public static Task<GetGroupsResult> InvokeAsync(GetGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetGroupsResult> Invoke(GetGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
public static Output<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
fn::invoke:
function: onelogin:index/getGroups:getGroups
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- The ID of the group.
- Id string
- The ID of the group.
- id String
- The ID of the group.
- id string
- The ID of the group.
- id str
- The ID of the group.
- id String
- The ID of the group.
getGroups Result
The following output properties are available:
- Groups
List<Get
Groups Group> - A list of groups. Each group has the following attributes:
- Id string
- The ID of the group.
- Groups
[]Get
Groups Group - A list of groups. Each group has the following attributes:
- Id string
- The ID of the group.
- groups
List<Get
Groups Group> - A list of groups. Each group has the following attributes:
- id String
- The ID of the group.
- groups
Get
Groups Group[] - A list of groups. Each group has the following attributes:
- id string
- The ID of the group.
- groups
Sequence[Get
Groups Group] - A list of groups. Each group has the following attributes:
- id str
- The ID of the group.
- groups List<Property Map>
- A list of groups. Each group has the following attributes:
- id String
- The ID of the group.
Supporting Types
GetGroupsGroup
Package Details
- Repository
- onelogin onelogin/terraform-provider-onelogin
- License
- Notes
- This Pulumi package is based on the
oneloginTerraform Provider.
Viewing docs for onelogin 0.12.0
published on Friday, Mar 13, 2026 by onelogin
published on Friday, Mar 13, 2026 by onelogin
