1. Packages
  2. Okta
  3. API Docs
  4. group
  5. getGroup
Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi

okta.group.getGroup

Explore with Pulumi AI

okta logo
Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi

    Use this data source to retrieve a group from Okta.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const example = okta.group.getGroup({
        name: "Example App",
    });
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.group.get_group(name="Example App")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/group"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := group.LookupGroup(ctx, &group.LookupGroupArgs{
    			Name: pulumi.StringRef("Example App"),
    		}, 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.Group.GetGroup.Invoke(new()
        {
            Name = "Example App",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.group.GroupFunctions;
    import com.pulumi.okta.group.inputs.GetGroupArgs;
    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 = GroupFunctions.getGroup(GetGroupArgs.builder()
                .name("Example App")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: okta:group:getGroup
          Arguments:
            name: Example App
    

    Using getGroup

    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 getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
    function getGroupOutput(args: GetGroupOutputArgs, opts?: InvokeOptions): Output<GetGroupResult>
    def get_group(delay_read_seconds: Optional[str] = None,
                  id: Optional[str] = None,
                  include_users: Optional[bool] = None,
                  name: Optional[str] = None,
                  type: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetGroupResult
    def get_group_output(delay_read_seconds: Optional[pulumi.Input[str]] = None,
                  id: Optional[pulumi.Input[str]] = None,
                  include_users: Optional[pulumi.Input[bool]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  type: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetGroupResult]
    func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)
    func LookupGroupOutput(ctx *Context, args *LookupGroupOutputArgs, opts ...InvokeOption) LookupGroupResultOutput

    > Note: This function is named LookupGroup in the Go SDK.

    public static class GetGroup 
    {
        public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetGroupResult> Invoke(GetGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: okta:group/getGroup:getGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DelayReadSeconds string
    Force delay of the group read by N seconds. Useful when eventual consistency of group information needs to be allowed for; for instance, when group rules are known to have been applied.
    Id string
    ID of the group. Conflicts with "name" and "type".
    IncludeUsers bool
    whether to retrieve all member ids.
    Name string

    name of group to retrieve.

    Okta API treats name as a starts with query. Therefore a name argument "My" will match any group starting with "My" such as "My Group" and "My Office"

    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).
    DelayReadSeconds string
    Force delay of the group read by N seconds. Useful when eventual consistency of group information needs to be allowed for; for instance, when group rules are known to have been applied.
    Id string
    ID of the group. Conflicts with "name" and "type".
    IncludeUsers bool
    whether to retrieve all member ids.
    Name string

    name of group to retrieve.

    Okta API treats name as a starts with query. Therefore a name argument "My" will match any group starting with "My" such as "My Group" and "My Office"

    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).
    delayReadSeconds String
    Force delay of the group read by N seconds. Useful when eventual consistency of group information needs to be allowed for; for instance, when group rules are known to have been applied.
    id String
    ID of the group. Conflicts with "name" and "type".
    includeUsers Boolean
    whether to retrieve all member ids.
    name String

    name of group to retrieve.

    Okta API treats name as a starts with query. Therefore a name argument "My" will match any group starting with "My" such as "My Group" and "My Office"

    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).
    delayReadSeconds string
    Force delay of the group read by N seconds. Useful when eventual consistency of group information needs to be allowed for; for instance, when group rules are known to have been applied.
    id string
    ID of the group. Conflicts with "name" and "type".
    includeUsers boolean
    whether to retrieve all member ids.
    name string

    name of group to retrieve.

    Okta API treats name as a starts with query. Therefore a name argument "My" will match any group starting with "My" such as "My Group" and "My Office"

    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).
    delay_read_seconds str
    Force delay of the group read by N seconds. Useful when eventual consistency of group information needs to be allowed for; for instance, when group rules are known to have been applied.
    id str
    ID of the group. Conflicts with "name" and "type".
    include_users bool
    whether to retrieve all member ids.
    name str

    name of group to retrieve.

    Okta API treats name as a starts with query. Therefore a name argument "My" will match any group starting with "My" such as "My Group" and "My Office"

    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).
    delayReadSeconds String
    Force delay of the group read by N seconds. Useful when eventual consistency of group information needs to be allowed for; for instance, when group rules are known to have been applied.
    id String
    ID of the group. Conflicts with "name" and "type".
    includeUsers Boolean
    whether to retrieve all member ids.
    name String

    name of group to retrieve.

    Okta API treats name as a starts with query. Therefore a name argument "My" will match any group starting with "My" such as "My Group" and "My Office"

    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).

    getGroup Result

    The following output properties are available:

    Description string
    description of group.
    Id string
    ID of group.
    Name string
    name of group.
    Users List<string>
    user ids that are members of this group, only included if include_users is set to true.
    DelayReadSeconds string
    IncludeUsers bool
    Type string
    type of group.
    Description string
    description of group.
    Id string
    ID of group.
    Name string
    name of group.
    Users []string
    user ids that are members of this group, only included if include_users is set to true.
    DelayReadSeconds string
    IncludeUsers bool
    Type string
    type of group.
    description String
    description of group.
    id String
    ID of group.
    name String
    name of group.
    users List<String>
    user ids that are members of this group, only included if include_users is set to true.
    delayReadSeconds String
    includeUsers Boolean
    type String
    type of group.
    description string
    description of group.
    id string
    ID of group.
    name string
    name of group.
    users string[]
    user ids that are members of this group, only included if include_users is set to true.
    delayReadSeconds string
    includeUsers boolean
    type string
    type of group.
    description str
    description of group.
    id str
    ID of group.
    name str
    name of group.
    users Sequence[str]
    user ids that are members of this group, only included if include_users is set to true.
    delay_read_seconds str
    include_users bool
    type str
    type of group.
    description String
    description of group.
    id String
    ID of group.
    name String
    name of group.
    users List<String>
    user ids that are members of this group, only included if include_users is set to true.
    delayReadSeconds String
    includeUsers Boolean
    type String
    type of group.

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi