GitLab

Pulumi Official
Package maintained by Pulumi
v4.7.1 published on Thursday, Jun 30, 2022 by Pulumi

getGroupMembership

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 Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(GitLab.GetGroupMembership.InvokeAsync(new GitLab.GetGroupMembershipArgs
        {
            FullPath = "foo/bar",
        }));
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gitlab.LookupGroupMembership(ctx, &GetGroupMembershipArgs{
			FullPath: pulumi.StringRef("foo/bar"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(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";

// By group's full path
const example = pulumi.output(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,
                         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,
                         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
FullPath string
GroupId int
AccessLevel string
FullPath string
GroupId int
accessLevel String
fullPath String
groupId Integer
accessLevel string
fullPath string
groupId number
accessLevel String
fullPath String
groupId Number

getGroupMembership Result

The following output properties are available:

AccessLevel string
FullPath string
GroupId int
Id string

The provider-assigned unique ID for this managed resource.

Members List<Pulumi.GitLab.Outputs.GetGroupMembershipMember>
AccessLevel string
FullPath string
GroupId int
Id string

The provider-assigned unique ID for this managed resource.

Members []GetGroupMembershipMember
accessLevel String
fullPath String
groupId Integer
id String

The provider-assigned unique ID for this managed resource.

members List<GetGroupMembershipMember>
accessLevel string
fullPath string
groupId number
id string

The provider-assigned unique ID for this managed resource.

members GetGroupMembershipMember[]
access_level str
full_path str
group_id int
id str

The provider-assigned unique ID for this managed resource.

members Sequence[GetGroupMembershipMember]
accessLevel String
fullPath String
groupId Number
id String

The provider-assigned unique ID for this managed resource.

members List<Property Map>

Supporting Types

GetGroupMembershipMember

AccessLevel string
AvatarUrl string
ExpiresAt string
Id int
Name string
State string
Username string
WebUrl string
AccessLevel string
AvatarUrl string
ExpiresAt string
Id int
Name string
State string
Username string
WebUrl string
accessLevel String
avatarUrl String
expiresAt String
id Integer
name String
state String
username String
webUrl String
accessLevel string
avatarUrl string
expiresAt string
id number
name string
state string
username string
webUrl string
accessLevel String
avatarUrl String
expiresAt String
id Number
name String
state String
username String
webUrl String

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes

This Pulumi package is based on the gitlab Terraform Provider.