okta logo
Okta v3.21.0, Mar 15 23

okta.getGroups

Use this data source to retrieve a list of groups from Okta.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Okta = Pulumi.Okta;

return await Deployment.RunAsync(() => 
{
    var example = Okta.GetGroups.Invoke(new()
    {
        Q = "Engineering - ",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := okta.GetGroups(ctx, &okta.GetGroupsArgs{
			Q: pulumi.StringRef("Engineering - "),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.OktaFunctions;
import com.pulumi.okta.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 example = OktaFunctions.getGroups(GetGroupsArgs.builder()
            .q("Engineering - ")
            .build());

    }
}
import pulumi
import pulumi_okta as okta

example = okta.get_groups(q="Engineering - ")
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = okta.getGroups({
    q: "Engineering - ",
});
variables:
  example:
    fn::invoke:
      Function: okta:getGroups
      Arguments:
        q: 'Engineering - '

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(q: Optional[str] = None,
               search: Optional[str] = None,
               type: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetGroupsResult
def get_groups_output(q: Optional[pulumi.Input[str]] = None,
               search: Optional[pulumi.Input[str]] = None,
               type: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetGroupsResult]
func GetGroups(ctx *Context, args *GetGroupsArgs, opts ...InvokeOption) (*GetGroupsResult, error)
func GetGroupsOutput(ctx *Context, args *GetGroupsOutputArgs, opts ...InvokeOption) GetGroupsResultOutput

> Note: This function is named GetGroups 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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: okta:index/getGroups:getGroups
  arguments:
    # arguments dictionary

The following arguments are supported:

Q string

Searches the name property of groups for matching value.

Search string

Searches for groups with a supported filtering expression for all attributes except for "_embedded", "_links", and "objectClass"

Type string

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

Q string

Searches the name property of groups for matching value.

Search string

Searches for groups with a supported filtering expression for all attributes except for "_embedded", "_links", and "objectClass"

Type string

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

q String

Searches the name property of groups for matching value.

search String

Searches for groups with a supported filtering expression for all attributes except for "_embedded", "_links", and "objectClass"

type String

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

q string

Searches the name property of groups for matching value.

search string

Searches for groups with a supported filtering expression for all attributes except for "_embedded", "_links", and "objectClass"

type string

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

q str

Searches the name property of groups for matching value.

search str

Searches for groups with a supported filtering expression for all attributes except for "_embedded", "_links", and "objectClass"

type str

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

q String

Searches the name property of groups for matching value.

search String

Searches for groups with a supported filtering expression for all attributes except for "_embedded", "_links", and "objectClass"

type String

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

getGroups Result

The following output properties are available:

Groups List<GetGroupsGroup>

collection of groups retrieved from Okta with the following properties.

Id string

The provider-assigned unique ID for this managed resource.

Q string
Search string
Type string

Group type.

Groups []GetGroupsGroup

collection of groups retrieved from Okta with the following properties.

Id string

The provider-assigned unique ID for this managed resource.

Q string
Search string
Type string

Group type.

groups List<GetGroupsGroup>

collection of groups retrieved from Okta with the following properties.

id String

The provider-assigned unique ID for this managed resource.

q String
search String
type String

Group type.

groups GetGroupsGroup[]

collection of groups retrieved from Okta with the following properties.

id string

The provider-assigned unique ID for this managed resource.

q string
search string
type string

Group type.

groups Sequence[GetGroupsGroup]

collection of groups retrieved from Okta with the following properties.

id str

The provider-assigned unique ID for this managed resource.

q str
search str
type str

Group type.

groups List<Property Map>

collection of groups retrieved from Okta with the following properties.

id String

The provider-assigned unique ID for this managed resource.

q String
search String
type String

Group type.

Supporting Types

GetGroupsGroup

CustomProfileAttributes string

raw JSON containing all custom profile attributes. Likely only useful on groups of type APP_GROUP.

Description string

Group description.

Id string

Group ID.

Name string

Group name.

Type string

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

CustomProfileAttributes string

raw JSON containing all custom profile attributes. Likely only useful on groups of type APP_GROUP.

Description string

Group description.

Id string

Group ID.

Name string

Group name.

Type string

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

customProfileAttributes String

raw JSON containing all custom profile attributes. Likely only useful on groups of type APP_GROUP.

description String

Group description.

id String

Group ID.

name String

Group name.

type String

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

customProfileAttributes string

raw JSON containing all custom profile attributes. Likely only useful on groups of type APP_GROUP.

description string

Group description.

id string

Group ID.

name string

Group name.

type string

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

custom_profile_attributes str

raw JSON containing all custom profile attributes. Likely only useful on groups of type APP_GROUP.

description str

Group description.

id str

Group ID.

name str

Group name.

type str

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

customProfileAttributes String

raw JSON containing all custom profile attributes. Likely only useful on groups of type APP_GROUP.

description String

Group description.

id String

Group ID.

name String

Group name.

type String

type of the group to retrieve. Can only be one of OKTA_GROUP (Native Okta Groups), APP_GROUP (Imported App Groups), or BUILT_IN (Okta System Groups).

Package Details

Repository
Okta pulumi/pulumi-okta
License
Apache-2.0
Notes

This Pulumi package is based on the okta Terraform Provider.