Okta v4.16.0 published on Wednesday, Apr 9, 2025 by Pulumi
okta.getGroups
Explore with Pulumi AI
Get a list of groups from Okta.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = okta.getGroups({
    q: "Engineering - ",
});
import pulumi
import pulumi_okta as okta
example = okta.get_groups(q="Engineering - ")
package main
import (
	"github.com/pulumi/pulumi-okta/sdk/v4/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
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() => 
{
    var example = Okta.GetGroups.Invoke(new()
    {
        Q = "Engineering - ",
    });
});
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());
    }
}
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)
public static Output<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
fn::invoke:
  function: okta:index/getGroups:getGroups
  arguments:
    # arguments dictionaryThe following arguments are supported:
getGroups Result
The following output properties are available:
- Groups
List<GetGroups Group> 
- Id string
- The provider-assigned unique ID for this managed resource.
- 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
- Groups
[]GetGroups Group 
- Id string
- The provider-assigned unique ID for this managed resource.
- 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
- groups
List<GetGroups Group> 
- id String
- The provider-assigned unique ID for this managed resource.
- 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
- groups
GetGroups Group[] 
- id string
- The provider-assigned unique ID for this managed resource.
- 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
- groups
Sequence[GetGroups Group] 
- id str
- The provider-assigned unique ID for this managed resource.
- 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
- groups List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- 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
Supporting Types
GetGroupsGroup  
- CustomProfile stringAttributes 
- Raw JSON containing all custom profile attributes. Likely only useful on groups of type
- Description string
- Group description.
- Id string
- Group ID.
- Name string
- Group name.
- Type string
- Group type.
- CustomProfile stringAttributes 
- Raw JSON containing all custom profile attributes. Likely only useful on groups of type
- Description string
- Group description.
- Id string
- Group ID.
- Name string
- Group name.
- Type string
- Group type.
- customProfile StringAttributes 
- Raw JSON containing all custom profile attributes. Likely only useful on groups of type
- description String
- Group description.
- id String
- Group ID.
- name String
- Group name.
- type String
- Group type.
- customProfile stringAttributes 
- Raw JSON containing all custom profile attributes. Likely only useful on groups of type
- description string
- Group description.
- id string
- Group ID.
- name string
- Group name.
- type string
- Group type.
- custom_profile_ strattributes 
- Raw JSON containing all custom profile attributes. Likely only useful on groups of type
- description str
- Group description.
- id str
- Group ID.
- name str
- Group name.
- type str
- Group type.
- customProfile StringAttributes 
- Raw JSON containing all custom profile attributes. Likely only useful on groups of type
- description String
- Group description.
- id String
- Group ID.
- name String
- Group name.
- type String
- Group type.
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the oktaTerraform Provider.