1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getGroupSubgroups
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

gitlab.getGroupSubgroups

Explore with Pulumi AI

gitlab logo
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

    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:

    GroupId int
    The ID of the group.
    AllAvailable bool
    Show all the groups you have access to.
    MinAccessLevel string
    Limit to groups where current user has at least this access level.
    OrderBy 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.
    SkipGroups List<int>
    Skip the group IDs passed.
    Sort string
    Order groups in asc or desc order.
    Statistics bool
    Include group statistics (administrators only).
    WithCustomAttributes bool
    Include custom attributes in response (administrators only).
    GroupId int
    The ID of the group.
    AllAvailable bool
    Show all the groups you have access to.
    MinAccessLevel string
    Limit to groups where current user has at least this access level.
    OrderBy 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.
    SkipGroups []int
    Skip the group IDs passed.
    Sort string
    Order groups in asc or desc order.
    Statistics bool
    Include group statistics (administrators only).
    WithCustomAttributes bool
    Include custom attributes in response (administrators only).
    groupId Integer
    The ID of the group.
    allAvailable Boolean
    Show all the groups you have access to.
    minAccessLevel String
    Limit to groups where current user has at least this access level.
    orderBy 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.
    skipGroups List<Integer>
    Skip the group IDs passed.
    sort String
    Order groups in asc or desc order.
    statistics Boolean
    Include group statistics (administrators only).
    withCustomAttributes Boolean
    Include custom attributes in response (administrators only).
    groupId number
    The ID of the group.
    allAvailable boolean
    Show all the groups you have access to.
    minAccessLevel string
    Limit to groups where current user has at least this access level.
    orderBy 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.
    skipGroups number[]
    Skip the group IDs passed.
    sort string
    Order groups in asc or desc order.
    statistics boolean
    Include group statistics (administrators only).
    withCustomAttributes boolean
    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_level str
    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_attributes bool
    Include custom attributes in response (administrators only).
    groupId Number
    The ID of the group.
    allAvailable Boolean
    Show all the groups you have access to.
    minAccessLevel String
    Limit to groups where current user has at least this access level.
    orderBy 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.
    skipGroups List<Number>
    Skip the group IDs passed.
    sort String
    Order groups in asc or desc order.
    statistics Boolean
    Include group statistics (administrators only).
    withCustomAttributes Boolean
    Include custom attributes in response (administrators only).

    getGroupSubgroups Result

    The following output properties are available:

    AllAvailable bool
    Show all the groups you have access to.
    GroupId int
    The ID of the group.
    Id string
    The provider-assigned unique ID for this managed resource.
    MinAccessLevel string
    Limit to groups where current user has at least this access level.
    OrderBy 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.
    SkipGroups 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.GitLab.Outputs.GetGroupSubgroupsSubgroup>
    Subgroups of the parent group.
    WithCustomAttributes bool
    Include custom attributes in response (administrators only).
    AllAvailable bool
    Show all the groups you have access to.
    GroupId int
    The ID of the group.
    Id string
    The provider-assigned unique ID for this managed resource.
    MinAccessLevel string
    Limit to groups where current user has at least this access level.
    OrderBy 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.
    SkipGroups []int
    Skip the group IDs passed.
    Sort string
    Order groups in asc or desc order.
    Statistics bool
    Include group statistics (administrators only).
    Subgroups []GetGroupSubgroupsSubgroup
    Subgroups of the parent group.
    WithCustomAttributes bool
    Include custom attributes in response (administrators only).
    allAvailable Boolean
    Show all the groups you have access to.
    groupId Integer
    The ID of the group.
    id String
    The provider-assigned unique ID for this managed resource.
    minAccessLevel String
    Limit to groups where current user has at least this access level.
    orderBy 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.
    skipGroups 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<GetGroupSubgroupsSubgroup>
    Subgroups of the parent group.
    withCustomAttributes Boolean
    Include custom attributes in response (administrators only).
    allAvailable boolean
    Show all the groups you have access to.
    groupId number
    The ID of the group.
    id string
    The provider-assigned unique ID for this managed resource.
    minAccessLevel string
    Limit to groups where current user has at least this access level.
    orderBy 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.
    skipGroups number[]
    Skip the group IDs passed.
    sort string
    Order groups in asc or desc order.
    statistics boolean
    Include group statistics (administrators only).
    subgroups GetGroupSubgroupsSubgroup[]
    Subgroups of the parent group.
    withCustomAttributes boolean
    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_level str
    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[GetGroupSubgroupsSubgroup]
    Subgroups of the parent group.
    with_custom_attributes bool
    Include custom attributes in response (administrators only).
    allAvailable Boolean
    Show all the groups you have access to.
    groupId Number
    The ID of the group.
    id String
    The provider-assigned unique ID for this managed resource.
    minAccessLevel String
    Limit to groups where current user has at least this access level.
    orderBy 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.
    skipGroups 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.
    withCustomAttributes Boolean
    Include custom attributes in response (administrators only).

    Supporting Types

    GetGroupSubgroupsSubgroup

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi