authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik
authentik.getGroups
Explore with Pulumi AI
authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik
Get groups list
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as authentik from "@pulumi/authentik";
const all = authentik.getGroups({});
const admins = authentik.getGroups({
    isSuperuser: true,
});
import pulumi
import pulumi_authentik as authentik
all = authentik.get_groups()
admins = authentik.get_groups(is_superuser=True)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/authentik/v2025/authentik"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := authentik.GetGroups(ctx, &authentik.GetGroupsArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = authentik.GetGroups(ctx, &authentik.GetGroupsArgs{
			IsSuperuser: pulumi.BoolRef(true),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Authentik = Pulumi.Authentik;
return await Deployment.RunAsync(() => 
{
    var all = Authentik.GetGroups.Invoke();
    var admins = Authentik.GetGroups.Invoke(new()
    {
        IsSuperuser = true,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.authentik.AuthentikFunctions;
import com.pulumi.authentik.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 = AuthentikFunctions.getGroups();
        final var admins = AuthentikFunctions.getGroups(GetGroupsArgs.builder()
            .isSuperuser(true)
            .build());
    }
}
variables:
  all:
    fn::invoke:
      function: authentik:getGroups
      arguments: {}
  admins:
    fn::invoke:
      function: authentik:getGroups
      arguments:
        isSuperuser: true
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(attributes: Optional[str] = None,
               id: Optional[str] = None,
               include_users: Optional[bool] = None,
               is_superuser: Optional[bool] = None,
               members_by_pks: Optional[Sequence[float]] = None,
               members_by_usernames: Optional[Sequence[str]] = None,
               name: Optional[str] = None,
               ordering: Optional[str] = None,
               search: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetGroupsResult
def get_groups_output(attributes: Optional[pulumi.Input[str]] = None,
               id: Optional[pulumi.Input[str]] = None,
               include_users: Optional[pulumi.Input[bool]] = None,
               is_superuser: Optional[pulumi.Input[bool]] = None,
               members_by_pks: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None,
               members_by_usernames: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
               name: Optional[pulumi.Input[str]] = None,
               ordering: Optional[pulumi.Input[str]] = None,
               search: 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: authentik:index/getGroups:getGroups
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Attributes string
- Id string
- The ID of this resource.
- IncludeUsers bool
- IsSuperuser bool
- MembersBy List<double>Pks 
- MembersBy List<string>Usernames 
- Name string
- Ordering string
- Search string
- Attributes string
- Id string
- The ID of this resource.
- IncludeUsers bool
- IsSuperuser bool
- MembersBy []float64Pks 
- MembersBy []stringUsernames 
- Name string
- Ordering string
- Search string
- attributes String
- id String
- The ID of this resource.
- includeUsers Boolean
- isSuperuser Boolean
- membersBy List<Double>Pks 
- membersBy List<String>Usernames 
- name String
- ordering String
- search String
- attributes string
- id string
- The ID of this resource.
- includeUsers boolean
- isSuperuser boolean
- membersBy number[]Pks 
- membersBy string[]Usernames 
- name string
- ordering string
- search string
- attributes str
- id str
- The ID of this resource.
- include_users bool
- is_superuser bool
- members_by_ Sequence[float]pks 
- members_by_ Sequence[str]usernames 
- name str
- ordering str
- search str
- attributes String
- id String
- The ID of this resource.
- includeUsers Boolean
- isSuperuser Boolean
- membersBy List<Number>Pks 
- membersBy List<String>Usernames 
- name String
- ordering String
- search String
getGroups Result
The following output properties are available:
- Groups
List<GetGroups Group> 
- Generated.
- Id string
- The ID of this resource.
- Attributes string
- IncludeUsers bool
- IsSuperuser bool
- MembersBy List<double>Pks 
- MembersBy List<string>Usernames 
- Name string
- Ordering string
- Search string
- Groups
[]GetGroups Group 
- Generated.
- Id string
- The ID of this resource.
- Attributes string
- IncludeUsers bool
- IsSuperuser bool
- MembersBy []float64Pks 
- MembersBy []stringUsernames 
- Name string
- Ordering string
- Search string
- groups
List<GetGroups Group> 
- Generated.
- id String
- The ID of this resource.
- attributes String
- includeUsers Boolean
- isSuperuser Boolean
- membersBy List<Double>Pks 
- membersBy List<String>Usernames 
- name String
- ordering String
- search String
- groups
GetGroups Group[] 
- Generated.
- id string
- The ID of this resource.
- attributes string
- includeUsers boolean
- isSuperuser boolean
- membersBy number[]Pks 
- membersBy string[]Usernames 
- name string
- ordering string
- search string
- groups
Sequence[GetGroups Group] 
- Generated.
- id str
- The ID of this resource.
- attributes str
- include_users bool
- is_superuser bool
- members_by_ Sequence[float]pks 
- members_by_ Sequence[str]usernames 
- name str
- ordering str
- search str
- groups List<Property Map>
- Generated.
- id String
- The ID of this resource.
- attributes String
- includeUsers Boolean
- isSuperuser Boolean
- membersBy List<Number>Pks 
- membersBy List<String>Usernames 
- name String
- ordering String
- search String
Supporting Types
GetGroupsGroup  
- Attributes string
- IsSuperuser bool
- Name string
- NumPk double
- Parent string
- ParentName string
- Pk string
- Users List<double>
- UsersObjs List<GetGroups Group Users Obj> 
- Attributes string
- IsSuperuser bool
- Name string
- NumPk float64
- Parent string
- ParentName string
- Pk string
- Users []float64
- UsersObjs []GetGroups Group Users Obj 
- attributes String
- isSuperuser Boolean
- name String
- numPk Double
- parent String
- parentName String
- pk String
- users List<Double>
- usersObjs List<GetGroups Group Users Obj> 
- attributes string
- isSuperuser boolean
- name string
- numPk number
- parent string
- parentName string
- pk string
- users number[]
- usersObjs GetGroups Group Users Obj[] 
- attributes str
- is_superuser bool
- name str
- num_pk float
- parent str
- parent_name str
- pk str
- users Sequence[float]
- users_objs Sequence[GetGroups Group Users Obj] 
- attributes String
- isSuperuser Boolean
- name String
- numPk Number
- parent String
- parentName String
- pk String
- users List<Number>
- usersObjs List<Property Map>
GetGroupsGroupUsersObj    
- attributes str
- email str
- is_active bool
- last_login str
- name str
- pk float
- uid str
- username str
Package Details
- Repository
- authentik goauthentik/terraform-provider-authentik
- License
- Notes
- This Pulumi package is based on the authentikTerraform Provider.
authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik