gitlab.getGroupMembership

Explore with Pulumi AI

The gitlab.GroupMembership data source allows to list and filter all members of a group specified by either its id or full path.

Upstream API: GitLab REST API docs

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;

return await Deployment.RunAsync(() => 
{
    var example = GitLab.GetGroupMembership.Invoke(new()
    {
        FullPath = "foo/bar",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gitlab.LookupGroupMembership(ctx, &gitlab.LookupGroupMembershipArgs{
			FullPath: pulumi.StringRef("foo/bar"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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.GetGroupMembershipArgs;
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.getGroupMembership(GetGroupMembershipArgs.builder()
            .fullPath("foo/bar")
            .build());

    }
}
import pulumi
import pulumi_gitlab as gitlab

example = gitlab.get_group_membership(full_path="foo/bar")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const example = gitlab.getGroupMembership({
    fullPath: "foo/bar",
});
variables:
  example:
    fn::invoke:
      Function: gitlab:getGroupMembership
      Arguments:
        fullPath: foo/bar

Using getGroupMembership

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 getGroupMembership(args: GetGroupMembershipArgs, opts?: InvokeOptions): Promise<GetGroupMembershipResult>
function getGroupMembershipOutput(args: GetGroupMembershipOutputArgs, opts?: InvokeOptions): Output<GetGroupMembershipResult>
def get_group_membership(access_level: Optional[str] = None,
                         full_path: Optional[str] = None,
                         group_id: Optional[int] = None,
                         inherited: Optional[bool] = None,
                         opts: Optional[InvokeOptions] = None) -> GetGroupMembershipResult
def get_group_membership_output(access_level: Optional[pulumi.Input[str]] = None,
                         full_path: Optional[pulumi.Input[str]] = None,
                         group_id: Optional[pulumi.Input[int]] = None,
                         inherited: Optional[pulumi.Input[bool]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetGroupMembershipResult]
func LookupGroupMembership(ctx *Context, args *LookupGroupMembershipArgs, opts ...InvokeOption) (*LookupGroupMembershipResult, error)
func LookupGroupMembershipOutput(ctx *Context, args *LookupGroupMembershipOutputArgs, opts ...InvokeOption) LookupGroupMembershipResultOutput

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

public static class GetGroupMembership 
{
    public static Task<GetGroupMembershipResult> InvokeAsync(GetGroupMembershipArgs args, InvokeOptions? opts = null)
    public static Output<GetGroupMembershipResult> Invoke(GetGroupMembershipInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGroupMembershipResult> getGroupMembership(GetGroupMembershipArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gitlab:index/getGroupMembership:getGroupMembership
  arguments:
    # arguments dictionary

The following arguments are supported:

AccessLevel string

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

FullPath string

The full path of the group.

GroupId int

The ID of the group.

Inherited bool

Return all project members including members through ancestor groups.

AccessLevel string

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

FullPath string

The full path of the group.

GroupId int

The ID of the group.

Inherited bool

Return all project members including members through ancestor groups.

accessLevel String

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

fullPath String

The full path of the group.

groupId Integer

The ID of the group.

inherited Boolean

Return all project members including members through ancestor groups.

accessLevel string

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

fullPath string

The full path of the group.

groupId number

The ID of the group.

inherited boolean

Return all project members including members through ancestor groups.

access_level str

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

full_path str

The full path of the group.

group_id int

The ID of the group.

inherited bool

Return all project members including members through ancestor groups.

accessLevel String

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

fullPath String

The full path of the group.

groupId Number

The ID of the group.

inherited Boolean

Return all project members including members through ancestor groups.

getGroupMembership Result

The following output properties are available:

AccessLevel string

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

FullPath string

The full path of the group.

GroupId int

The ID of the group.

Id string

The provider-assigned unique ID for this managed resource.

Members List<Pulumi.GitLab.Outputs.GetGroupMembershipMember>

The list of group members.

Inherited bool

Return all project members including members through ancestor groups.

AccessLevel string

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

FullPath string

The full path of the group.

GroupId int

The ID of the group.

Id string

The provider-assigned unique ID for this managed resource.

Members []GetGroupMembershipMember

The list of group members.

Inherited bool

Return all project members including members through ancestor groups.

accessLevel String

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

fullPath String

The full path of the group.

groupId Integer

The ID of the group.

id String

The provider-assigned unique ID for this managed resource.

members List<GetGroupMembershipMember>

The list of group members.

inherited Boolean

Return all project members including members through ancestor groups.

accessLevel string

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

fullPath string

The full path of the group.

groupId number

The ID of the group.

id string

The provider-assigned unique ID for this managed resource.

members GetGroupMembershipMember[]

The list of group members.

inherited boolean

Return all project members including members through ancestor groups.

access_level str

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

full_path str

The full path of the group.

group_id int

The ID of the group.

id str

The provider-assigned unique ID for this managed resource.

members Sequence[GetGroupMembershipMember]

The list of group members.

inherited bool

Return all project members including members through ancestor groups.

accessLevel String

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

fullPath String

The full path of the group.

groupId Number

The ID of the group.

id String

The provider-assigned unique ID for this managed resource.

members List<Property Map>

The list of group members.

inherited Boolean

Return all project members including members through ancestor groups.

Supporting Types

GetGroupMembershipMember

AccessLevel string

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

AvatarUrl string
ExpiresAt string
Id int

The ID of this resource.

Name string
State string
Username string
WebUrl string
AccessLevel string

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

AvatarUrl string
ExpiresAt string
Id int

The ID of this resource.

Name string
State string
Username string
WebUrl string
accessLevel String

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

avatarUrl String
expiresAt String
id Integer

The ID of this resource.

name String
state String
username String
webUrl String
accessLevel string

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

avatarUrl string
expiresAt string
id number

The ID of this resource.

name string
state string
username string
webUrl string
access_level str

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

avatar_url str
expires_at str
id int

The ID of this resource.

name str
state str
username str
web_url str
accessLevel String

Only return members with the desired access level. Acceptable values are: guest, reporter, developer, maintainer, owner.

avatarUrl String
expiresAt String
id Number

The ID of this resource.

name String
state String
username String
webUrl String

Package Details

Repository
GitLab pulumi/pulumi-gitlab
License
Apache-2.0
Notes

This Pulumi package is based on the gitlab Terraform Provider.