GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi
gitlab.getGroups
Explore with Pulumi AI
The gitlab.getGroups
data source allows details of multiple groups to be retrieved given some optional filter criteria.
Some attributes might not be returned depending on if you’re an admin or not.
Some available options require administrator privileges.
Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = gitlab.getGroups({
sort: "desc",
orderBy: "name",
});
const example-two = gitlab.getGroups({
search: "GitLab",
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.get_groups(sort="desc",
order_by="name")
example_two = gitlab.get_groups(search="GitLab")
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.GetGroups(ctx, &gitlab.GetGroupsArgs{
Sort: pulumi.StringRef("desc"),
OrderBy: pulumi.StringRef("name"),
}, nil)
if err != nil {
return err
}
_, err = gitlab.GetGroups(ctx, &gitlab.GetGroupsArgs{
Search: pulumi.StringRef("GitLab"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = GitLab.GetGroups.Invoke(new()
{
Sort = "desc",
OrderBy = "name",
});
var example_two = GitLab.GetGroups.Invoke(new()
{
Search = "GitLab",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.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 = GitlabFunctions.getGroups(GetGroupsArgs.builder()
.sort("desc")
.orderBy("name")
.build());
final var example-two = GitlabFunctions.getGroups(GetGroupsArgs.builder()
.search("GitLab")
.build());
}
}
variables:
example:
fn::invoke:
Function: gitlab:getGroups
Arguments:
sort: desc
orderBy: name
example-two:
fn::invoke:
Function: gitlab:getGroups
Arguments:
search: GitLab
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(order_by: Optional[str] = None,
search: Optional[str] = None,
sort: Optional[str] = None,
top_level_only: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetGroupsResult
def get_groups_output(order_by: Optional[pulumi.Input[str]] = None,
search: Optional[pulumi.Input[str]] = None,
sort: Optional[pulumi.Input[str]] = None,
top_level_only: Optional[pulumi.Input[bool]] = 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: gitlab:index/getGroups:getGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Order
By string - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - Search string
- Search groups by name or path.
- Sort string
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- Top
Level boolOnly - Limit to top level groups, excluding all subgroups.
- Order
By string - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - Search string
- Search groups by name or path.
- Sort string
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- Top
Level boolOnly - Limit to top level groups, excluding all subgroups.
- order
By String - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - search String
- Search groups by name or path.
- sort String
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- top
Level BooleanOnly - Limit to top level groups, excluding all subgroups.
- order
By string - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - search string
- Search groups by name or path.
- sort string
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- top
Level booleanOnly - Limit to top level groups, excluding all subgroups.
- order_
by str - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - search str
- Search groups by name or path.
- sort str
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- top_
level_ boolonly - Limit to top level groups, excluding all subgroups.
- order
By String - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - search String
- Search groups by name or path.
- sort String
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- top
Level BooleanOnly - Limit to top level groups, excluding all subgroups.
getGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Git Lab. Outputs. Get Groups Group> - The list of groups.
- Id string
- The provider-assigned unique ID for this managed resource.
- Order
By string - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - Search string
- Search groups by name or path.
- Sort string
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- Top
Level boolOnly - Limit to top level groups, excluding all subgroups.
- Groups
[]Get
Groups Group - The list of groups.
- Id string
- The provider-assigned unique ID for this managed resource.
- Order
By string - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - Search string
- Search groups by name or path.
- Sort string
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- Top
Level boolOnly - Limit to top level groups, excluding all subgroups.
- groups
List<Get
Groups Group> - The list of groups.
- id String
- The provider-assigned unique ID for this managed resource.
- order
By String - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - search String
- Search groups by name or path.
- sort String
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- top
Level BooleanOnly - Limit to top level groups, excluding all subgroups.
- groups
Get
Groups Group[] - The list of groups.
- id string
- The provider-assigned unique ID for this managed resource.
- order
By string - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - search string
- Search groups by name or path.
- sort string
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- top
Level booleanOnly - Limit to top level groups, excluding all subgroups.
- groups
Sequence[Get
Groups Group] - The list of groups.
- id str
- The provider-assigned unique ID for this managed resource.
- order_
by str - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - search str
- Search groups by name or path.
- sort str
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- top_
level_ boolonly - Limit to top level groups, excluding all subgroups.
- groups List<Property Map>
- The list of groups.
- id String
- The provider-assigned unique ID for this managed resource.
- order
By String - Order the groups' list by
id
,name
,path
, orsimilarity
. (Requires administrator privileges) - search String
- Search groups by name or path.
- sort String
- Sort groups' list in asc or desc order. (Requires administrator privileges)
- top
Level BooleanOnly - Limit to top level groups, excluding all subgroups.
Supporting Types
GetGroupsGroup
- Default
Branch intProtection - Whether developers and maintainers can push to the applicable default branch.
- Description string
- The description of the group.
- Full
Name string - The full name of the group.
- Full
Path string - The full path of the group.
- Group
Id int - The ID of the group.
- Lfs
Enabled bool - Boolean, is LFS enabled for projects in this group.
- Name string
- The name of this group.
- Parent
Id int - Integer, ID of the parent group.
- Path string
- The path of the group.
- Prevent
Forking boolOutside Group - When enabled, users can not fork projects from this group to external namespaces.
- Request
Access boolEnabled - Boolean, is request for access enabled to the group.
- Runners
Token string - The group level registration token to use during runner setup.
- string
- Enable or disable shared runners for a group’s subgroups and projects. Valid values are:
enabled
,disabled_and_overridable
,disabled_and_unoverridable
,disabled_with_override
. - Visibility
Level string - Visibility level of the group. Possible values are
private
,internal
,public
. - Web
Url string - Web URL of the group.
- Wiki
Access stringLevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled
,private
,enabled
.
- Default
Branch intProtection - Whether developers and maintainers can push to the applicable default branch.
- Description string
- The description of the group.
- Full
Name string - The full name of the group.
- Full
Path string - The full path of the group.
- Group
Id int - The ID of the group.
- Lfs
Enabled bool - Boolean, is LFS enabled for projects in this group.
- Name string
- The name of this group.
- Parent
Id int - Integer, ID of the parent group.
- Path string
- The path of the group.
- Prevent
Forking boolOutside Group - When enabled, users can not fork projects from this group to external namespaces.
- Request
Access boolEnabled - Boolean, is request for access enabled to the group.
- Runners
Token string - The group level registration token to use during runner setup.
- string
- Enable or disable shared runners for a group’s subgroups and projects. Valid values are:
enabled
,disabled_and_overridable
,disabled_and_unoverridable
,disabled_with_override
. - Visibility
Level string - Visibility level of the group. Possible values are
private
,internal
,public
. - Web
Url string - Web URL of the group.
- Wiki
Access stringLevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled
,private
,enabled
.
- default
Branch IntegerProtection - Whether developers and maintainers can push to the applicable default branch.
- description String
- The description of the group.
- full
Name String - The full name of the group.
- full
Path String - The full path of the group.
- group
Id Integer - The ID of the group.
- lfs
Enabled Boolean - Boolean, is LFS enabled for projects in this group.
- name String
- The name of this group.
- parent
Id Integer - Integer, ID of the parent group.
- path String
- The path of the group.
- prevent
Forking BooleanOutside Group - When enabled, users can not fork projects from this group to external namespaces.
- request
Access BooleanEnabled - Boolean, is request for access enabled to the group.
- runners
Token String - The group level registration token to use during runner setup.
- String
- Enable or disable shared runners for a group’s subgroups and projects. Valid values are:
enabled
,disabled_and_overridable
,disabled_and_unoverridable
,disabled_with_override
. - visibility
Level String - Visibility level of the group. Possible values are
private
,internal
,public
. - web
Url String - Web URL of the group.
- wiki
Access StringLevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled
,private
,enabled
.
- default
Branch numberProtection - Whether developers and maintainers can push to the applicable default branch.
- description string
- The description of the group.
- full
Name string - The full name of the group.
- full
Path string - The full path of the group.
- group
Id number - The ID of the group.
- lfs
Enabled boolean - Boolean, is LFS enabled for projects in this group.
- name string
- The name of this group.
- parent
Id number - Integer, ID of the parent group.
- path string
- The path of the group.
- prevent
Forking booleanOutside Group - When enabled, users can not fork projects from this group to external namespaces.
- request
Access booleanEnabled - Boolean, is request for access enabled to the group.
- runners
Token string - The group level registration token to use during runner setup.
- string
- Enable or disable shared runners for a group’s subgroups and projects. Valid values are:
enabled
,disabled_and_overridable
,disabled_and_unoverridable
,disabled_with_override
. - visibility
Level string - Visibility level of the group. Possible values are
private
,internal
,public
. - web
Url string - Web URL of the group.
- wiki
Access stringLevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled
,private
,enabled
.
- default_
branch_ intprotection - Whether developers and maintainers can push to the applicable default branch.
- description str
- The description of the group.
- full_
name str - The full name of the group.
- full_
path str - The full path of the group.
- group_
id int - The ID of the group.
- lfs_
enabled bool - Boolean, is LFS enabled for projects in this group.
- name str
- The name of this group.
- parent_
id int - Integer, ID of the parent group.
- path str
- The path of the group.
- prevent_
forking_ booloutside_ group - When enabled, users can not fork projects from this group to external namespaces.
- request_
access_ boolenabled - Boolean, is request for access enabled to the group.
- runners_
token str - The group level registration token to use during runner setup.
- str
- Enable or disable shared runners for a group’s subgroups and projects. Valid values are:
enabled
,disabled_and_overridable
,disabled_and_unoverridable
,disabled_with_override
. - visibility_
level str - Visibility level of the group. Possible values are
private
,internal
,public
. - web_
url str - Web URL of the group.
- wiki_
access_ strlevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled
,private
,enabled
.
- default
Branch NumberProtection - Whether developers and maintainers can push to the applicable default branch.
- description String
- The description of the group.
- full
Name String - The full name of the group.
- full
Path String - The full path of the group.
- group
Id Number - The ID of the group.
- lfs
Enabled Boolean - Boolean, is LFS enabled for projects in this group.
- name String
- The name of this group.
- parent
Id Number - Integer, ID of the parent group.
- path String
- The path of the group.
- prevent
Forking BooleanOutside Group - When enabled, users can not fork projects from this group to external namespaces.
- request
Access BooleanEnabled - Boolean, is request for access enabled to the group.
- runners
Token String - The group level registration token to use during runner setup.
- String
- Enable or disable shared runners for a group’s subgroups and projects. Valid values are:
enabled
,disabled_and_overridable
,disabled_and_unoverridable
,disabled_with_override
. - visibility
Level String - Visibility level of the group. Possible values are
private
,internal
,public
. - web
Url String - Web URL of the group.
- wiki
Access StringLevel - The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are
disabled
,private
,enabled
.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.