GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi
gitlab.getGroupSubgroups
Explore with Pulumi AI
The gitlab.getGroupSubgroups
data source allows to get subgroups of a group.
Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
export = async () => {
const subgroups = await gitlab.getGroupSubgroups({
groupId: 123456,
});
return {
subgroups: subgroups,
};
}
import pulumi
import pulumi_gitlab as gitlab
subgroups = gitlab.get_group_subgroups(group_id=123456)
pulumi.export("subgroups", subgroups)
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 {
subgroups, err := gitlab.GetGroupSubgroups(ctx, &gitlab.GetGroupSubgroupsArgs{
GroupId: 123456,
}, nil)
if err != nil {
return err
}
ctx.Export("subgroups", subgroups)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var subgroups = GitLab.GetGroupSubgroups.Invoke(new()
{
GroupId = 123456,
});
return new Dictionary<string, object?>
{
["subgroups"] = subgroups,
};
});
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.GetGroupSubgroupsArgs;
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 subgroups = GitlabFunctions.getGroupSubgroups(GetGroupSubgroupsArgs.builder()
.groupId("123456")
.build());
ctx.export("subgroups", subgroups.applyValue(getGroupSubgroupsResult -> getGroupSubgroupsResult));
}
}
variables:
subgroups:
fn::invoke:
Function: gitlab:getGroupSubgroups
Arguments:
groupId: '123456'
outputs:
subgroups: ${subgroups}
Using getGroupSubgroups
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 getGroupSubgroups(args: GetGroupSubgroupsArgs, opts?: InvokeOptions): Promise<GetGroupSubgroupsResult>
function getGroupSubgroupsOutput(args: GetGroupSubgroupsOutputArgs, opts?: InvokeOptions): Output<GetGroupSubgroupsResult>
def get_group_subgroups(all_available: Optional[bool] = None,
group_id: Optional[int] = None,
min_access_level: Optional[str] = None,
order_by: Optional[str] = None,
owned: Optional[bool] = None,
search: Optional[str] = None,
skip_groups: Optional[Sequence[int]] = None,
sort: Optional[str] = None,
statistics: Optional[bool] = None,
with_custom_attributes: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetGroupSubgroupsResult
def get_group_subgroups_output(all_available: Optional[pulumi.Input[bool]] = None,
group_id: Optional[pulumi.Input[int]] = None,
min_access_level: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
owned: Optional[pulumi.Input[bool]] = None,
search: Optional[pulumi.Input[str]] = None,
skip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
sort: Optional[pulumi.Input[str]] = None,
statistics: Optional[pulumi.Input[bool]] = None,
with_custom_attributes: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGroupSubgroupsResult]
func GetGroupSubgroups(ctx *Context, args *GetGroupSubgroupsArgs, opts ...InvokeOption) (*GetGroupSubgroupsResult, error)
func GetGroupSubgroupsOutput(ctx *Context, args *GetGroupSubgroupsOutputArgs, opts ...InvokeOption) GetGroupSubgroupsResultOutput
> Note: This function is named GetGroupSubgroups
in the Go SDK.
public static class GetGroupSubgroups
{
public static Task<GetGroupSubgroupsResult> InvokeAsync(GetGroupSubgroupsArgs args, InvokeOptions? opts = null)
public static Output<GetGroupSubgroupsResult> Invoke(GetGroupSubgroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGroupSubgroupsResult> getGroupSubgroups(GetGroupSubgroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gitlab:index/getGroupSubgroups:getGroupSubgroups
arguments:
# arguments dictionary
The following arguments are supported:
- Group
Id int - The ID of the group.
- All
Available bool - Show all the groups you have access to.
- Min
Access stringLevel - Limit to groups where current user has at least this access level.
- Order
By string - Order groups by name, path or id.
- Owned bool
- Limit to groups explicitly owned by the current user.
- Search string
- Return the list of authorized groups matching the search criteria.
- Skip
Groups List<int> - Skip the group IDs passed.
- Sort string
- Order groups in asc or desc order.
- Statistics bool
- Include group statistics (administrators only).
- With
Custom boolAttributes - Include custom attributes in response (administrators only).
- Group
Id int - The ID of the group.
- All
Available bool - Show all the groups you have access to.
- Min
Access stringLevel - Limit to groups where current user has at least this access level.
- Order
By string - Order groups by name, path or id.
- Owned bool
- Limit to groups explicitly owned by the current user.
- Search string
- Return the list of authorized groups matching the search criteria.
- Skip
Groups []int - Skip the group IDs passed.
- Sort string
- Order groups in asc or desc order.
- Statistics bool
- Include group statistics (administrators only).
- With
Custom boolAttributes - Include custom attributes in response (administrators only).
- group
Id Integer - The ID of the group.
- all
Available Boolean - Show all the groups you have access to.
- min
Access StringLevel - Limit to groups where current user has at least this access level.
- order
By String - Order groups by name, path or id.
- owned Boolean
- Limit to groups explicitly owned by the current user.
- search String
- Return the list of authorized groups matching the search criteria.
- skip
Groups List<Integer> - Skip the group IDs passed.
- sort String
- Order groups in asc or desc order.
- statistics Boolean
- Include group statistics (administrators only).
- with
Custom BooleanAttributes - Include custom attributes in response (administrators only).
- group
Id number - The ID of the group.
- all
Available boolean - Show all the groups you have access to.
- min
Access stringLevel - Limit to groups where current user has at least this access level.
- order
By string - Order groups by name, path or id.
- owned boolean
- Limit to groups explicitly owned by the current user.
- search string
- Return the list of authorized groups matching the search criteria.
- skip
Groups number[] - Skip the group IDs passed.
- sort string
- Order groups in asc or desc order.
- statistics boolean
- Include group statistics (administrators only).
- with
Custom booleanAttributes - Include custom attributes in response (administrators only).
- group_
id int - The ID of the group.
- all_
available bool - Show all the groups you have access to.
- min_
access_ strlevel - Limit to groups where current user has at least this access level.
- order_
by str - Order groups by name, path or id.
- owned bool
- Limit to groups explicitly owned by the current user.
- search str
- Return the list of authorized groups matching the search criteria.
- skip_
groups Sequence[int] - Skip the group IDs passed.
- sort str
- Order groups in asc or desc order.
- statistics bool
- Include group statistics (administrators only).
- with_
custom_ boolattributes - Include custom attributes in response (administrators only).
- group
Id Number - The ID of the group.
- all
Available Boolean - Show all the groups you have access to.
- min
Access StringLevel - Limit to groups where current user has at least this access level.
- order
By String - Order groups by name, path or id.
- owned Boolean
- Limit to groups explicitly owned by the current user.
- search String
- Return the list of authorized groups matching the search criteria.
- skip
Groups List<Number> - Skip the group IDs passed.
- sort String
- Order groups in asc or desc order.
- statistics Boolean
- Include group statistics (administrators only).
- with
Custom BooleanAttributes - Include custom attributes in response (administrators only).
getGroupSubgroups Result
The following output properties are available:
- All
Available bool - Show all the groups you have access to.
- Group
Id int - The ID of the group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Min
Access stringLevel - Limit to groups where current user has at least this access level.
- Order
By string - Order groups by name, path or id.
- Owned bool
- Limit to groups explicitly owned by the current user.
- Search string
- Return the list of authorized groups matching the search criteria.
- Skip
Groups List<int> - Skip the group IDs passed.
- Sort string
- Order groups in asc or desc order.
- Statistics bool
- Include group statistics (administrators only).
- Subgroups
List<Pulumi.
Git Lab. Outputs. Get Group Subgroups Subgroup> - Subgroups of the parent group.
- With
Custom boolAttributes - Include custom attributes in response (administrators only).
- All
Available bool - Show all the groups you have access to.
- Group
Id int - The ID of the group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Min
Access stringLevel - Limit to groups where current user has at least this access level.
- Order
By string - Order groups by name, path or id.
- Owned bool
- Limit to groups explicitly owned by the current user.
- Search string
- Return the list of authorized groups matching the search criteria.
- Skip
Groups []int - Skip the group IDs passed.
- Sort string
- Order groups in asc or desc order.
- Statistics bool
- Include group statistics (administrators only).
- Subgroups
[]Get
Group Subgroups Subgroup - Subgroups of the parent group.
- With
Custom boolAttributes - Include custom attributes in response (administrators only).
- all
Available Boolean - Show all the groups you have access to.
- group
Id Integer - The ID of the group.
- id String
- The provider-assigned unique ID for this managed resource.
- min
Access StringLevel - Limit to groups where current user has at least this access level.
- order
By String - Order groups by name, path or id.
- owned Boolean
- Limit to groups explicitly owned by the current user.
- search String
- Return the list of authorized groups matching the search criteria.
- skip
Groups List<Integer> - Skip the group IDs passed.
- sort String
- Order groups in asc or desc order.
- statistics Boolean
- Include group statistics (administrators only).
- subgroups
List<Get
Group Subgroups Subgroup> - Subgroups of the parent group.
- with
Custom BooleanAttributes - Include custom attributes in response (administrators only).
- all
Available boolean - Show all the groups you have access to.
- group
Id number - The ID of the group.
- id string
- The provider-assigned unique ID for this managed resource.
- min
Access stringLevel - Limit to groups where current user has at least this access level.
- order
By string - Order groups by name, path or id.
- owned boolean
- Limit to groups explicitly owned by the current user.
- search string
- Return the list of authorized groups matching the search criteria.
- skip
Groups number[] - Skip the group IDs passed.
- sort string
- Order groups in asc or desc order.
- statistics boolean
- Include group statistics (administrators only).
- subgroups
Get
Group Subgroups Subgroup[] - Subgroups of the parent group.
- with
Custom booleanAttributes - Include custom attributes in response (administrators only).
- all_
available bool - Show all the groups you have access to.
- group_
id int - The ID of the group.
- id str
- The provider-assigned unique ID for this managed resource.
- min_
access_ strlevel - Limit to groups where current user has at least this access level.
- order_
by str - Order groups by name, path or id.
- owned bool
- Limit to groups explicitly owned by the current user.
- search str
- Return the list of authorized groups matching the search criteria.
- skip_
groups Sequence[int] - Skip the group IDs passed.
- sort str
- Order groups in asc or desc order.
- statistics bool
- Include group statistics (administrators only).
- subgroups
Sequence[Get
Group Subgroups Subgroup] - Subgroups of the parent group.
- with_
custom_ boolattributes - Include custom attributes in response (administrators only).
- all
Available Boolean - Show all the groups you have access to.
- group
Id Number - The ID of the group.
- id String
- The provider-assigned unique ID for this managed resource.
- min
Access StringLevel - Limit to groups where current user has at least this access level.
- order
By String - Order groups by name, path or id.
- owned Boolean
- Limit to groups explicitly owned by the current user.
- search String
- Return the list of authorized groups matching the search criteria.
- skip
Groups List<Number> - Skip the group IDs passed.
- sort String
- Order groups in asc or desc order.
- statistics Boolean
- Include group statistics (administrators only).
- subgroups List<Property Map>
- Subgroups of the parent group.
- with
Custom BooleanAttributes - Include custom attributes in response (administrators only).
Supporting Types
GetGroupSubgroupsSubgroup
- Auto
Devops boolEnabled - Avatar
Url string - Created
At string - Default
Branch intProtection - Description string
- Emails
Enabled bool - File
Template intProject Id - Full
Name string - Full
Path string - Group
Id int - Ip
Restriction stringRanges - Lfs
Enabled bool - Mentions
Disabled bool - Name string
- Parent
Id int - Path string
- Project
Creation stringLevel - Request
Access boolEnabled - Require
Two boolFactor Authentication - bool
- string
- Statistics Dictionary<string, string>
- Subgroup
Creation stringLevel - Two
Factor intGrace Period - Visibility string
- Web
Url string - Wiki
Access stringLevel
- Auto
Devops boolEnabled - Avatar
Url string - Created
At string - Default
Branch intProtection - Description string
- Emails
Enabled bool - File
Template intProject Id - Full
Name string - Full
Path string - Group
Id int - Ip
Restriction stringRanges - Lfs
Enabled bool - Mentions
Disabled bool - Name string
- Parent
Id int - Path string
- Project
Creation stringLevel - Request
Access boolEnabled - Require
Two boolFactor Authentication - bool
- string
- Statistics map[string]string
- Subgroup
Creation stringLevel - Two
Factor intGrace Period - Visibility string
- Web
Url string - Wiki
Access stringLevel
- auto
Devops BooleanEnabled - avatar
Url String - created
At String - default
Branch IntegerProtection - description String
- emails
Enabled Boolean - file
Template IntegerProject Id - full
Name String - full
Path String - group
Id Integer - ip
Restriction StringRanges - lfs
Enabled Boolean - mentions
Disabled Boolean - name String
- parent
Id Integer - path String
- project
Creation StringLevel - request
Access BooleanEnabled - require
Two BooleanFactor Authentication - Boolean
- String
- statistics Map<String,String>
- subgroup
Creation StringLevel - two
Factor IntegerGrace Period - visibility String
- web
Url String - wiki
Access StringLevel
- auto
Devops booleanEnabled - avatar
Url string - created
At string - default
Branch numberProtection - description string
- emails
Enabled boolean - file
Template numberProject Id - full
Name string - full
Path string - group
Id number - ip
Restriction stringRanges - lfs
Enabled boolean - mentions
Disabled boolean - name string
- parent
Id number - path string
- project
Creation stringLevel - request
Access booleanEnabled - require
Two booleanFactor Authentication - boolean
- string
- statistics {[key: string]: string}
- subgroup
Creation stringLevel - two
Factor numberGrace Period - visibility string
- web
Url string - wiki
Access stringLevel
- auto_
devops_ boolenabled - avatar_
url str - created_
at str - default_
branch_ intprotection - description str
- emails_
enabled bool - file_
template_ intproject_ id - full_
name str - full_
path str - group_
id int - ip_
restriction_ strranges - lfs_
enabled bool - mentions_
disabled bool - name str
- parent_
id int - path str
- project_
creation_ strlevel - request_
access_ boolenabled - require_
two_ boolfactor_ authentication - bool
- str
- statistics Mapping[str, str]
- subgroup_
creation_ strlevel - two_
factor_ intgrace_ period - visibility str
- web_
url str - wiki_
access_ strlevel
- auto
Devops BooleanEnabled - avatar
Url String - created
At String - default
Branch NumberProtection - description String
- emails
Enabled Boolean - file
Template NumberProject Id - full
Name String - full
Path String - group
Id Number - ip
Restriction StringRanges - lfs
Enabled Boolean - mentions
Disabled Boolean - name String
- parent
Id Number - path String
- project
Creation StringLevel - request
Access BooleanEnabled - require
Two BooleanFactor Authentication - Boolean
- String
- statistics Map<String>
- subgroup
Creation StringLevel - two
Factor NumberGrace Period - visibility String
- web
Url String - wiki
Access StringLevel
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.