1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getMemberRole
GitLab v9.5.0 published on Saturday, Nov 22, 2025 by Pulumi
gitlab logo
GitLab v9.5.0 published on Saturday, Nov 22, 2025 by Pulumi

    The gitlab.MemberRole data source allows details of a custom member role to be retrieved.

    Upstream API: GitLab GraphQL API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const example = gitlab.getMemberRole({
        id: "gid://gitlab/MemberRole/1",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    example = gitlab.get_member_role(id="gid://gitlab/MemberRole/1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gitlab.LookupMemberRole(ctx, &gitlab.LookupMemberRoleArgs{
    			Id: "gid://gitlab/MemberRole/1",
    		}, 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.GetMemberRole.Invoke(new()
        {
            Id = "gid://gitlab/MemberRole/1",
        });
    
    });
    
    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.GetMemberRoleArgs;
    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.getMemberRole(GetMemberRoleArgs.builder()
                .id("gid://gitlab/MemberRole/1")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: gitlab:getMemberRole
          arguments:
            id: gid://gitlab/MemberRole/1
    

    Using getMemberRole

    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 getMemberRole(args: GetMemberRoleArgs, opts?: InvokeOptions): Promise<GetMemberRoleResult>
    function getMemberRoleOutput(args: GetMemberRoleOutputArgs, opts?: InvokeOptions): Output<GetMemberRoleResult>
    def get_member_role(id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetMemberRoleResult
    def get_member_role_output(id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetMemberRoleResult]
    func LookupMemberRole(ctx *Context, args *LookupMemberRoleArgs, opts ...InvokeOption) (*LookupMemberRoleResult, error)
    func LookupMemberRoleOutput(ctx *Context, args *LookupMemberRoleOutputArgs, opts ...InvokeOption) LookupMemberRoleResultOutput

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

    public static class GetMemberRole 
    {
        public static Task<GetMemberRoleResult> InvokeAsync(GetMemberRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetMemberRoleResult> Invoke(GetMemberRoleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMemberRoleResult> getMemberRole(GetMemberRoleArgs args, InvokeOptions options)
    public static Output<GetMemberRoleResult> getMemberRole(GetMemberRoleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gitlab:index/getMemberRole:getMemberRole
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    Id string
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    id String
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    id string
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    id str
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    id String
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1

    getMemberRole Result

    The following output properties are available:

    BaseAccessLevel string
    The base access level of the custom role.
    CreatedAt string
    Timestamp of when the member role was created.
    Description string
    Description of the member role.
    EditPath string
    The Web UI path to edit the member role
    EnabledPermissions List<string>
    All permissions enabled for the custom role.
    Id string
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    Iid int
    The member role ID integer value extracted from the id attribute
    Name string
    Name of the member role.
    BaseAccessLevel string
    The base access level of the custom role.
    CreatedAt string
    Timestamp of when the member role was created.
    Description string
    Description of the member role.
    EditPath string
    The Web UI path to edit the member role
    EnabledPermissions []string
    All permissions enabled for the custom role.
    Id string
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    Iid int
    The member role ID integer value extracted from the id attribute
    Name string
    Name of the member role.
    baseAccessLevel String
    The base access level of the custom role.
    createdAt String
    Timestamp of when the member role was created.
    description String
    Description of the member role.
    editPath String
    The Web UI path to edit the member role
    enabledPermissions List<String>
    All permissions enabled for the custom role.
    id String
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    iid Integer
    The member role ID integer value extracted from the id attribute
    name String
    Name of the member role.
    baseAccessLevel string
    The base access level of the custom role.
    createdAt string
    Timestamp of when the member role was created.
    description string
    Description of the member role.
    editPath string
    The Web UI path to edit the member role
    enabledPermissions string[]
    All permissions enabled for the custom role.
    id string
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    iid number
    The member role ID integer value extracted from the id attribute
    name string
    Name of the member role.
    base_access_level str
    The base access level of the custom role.
    created_at str
    Timestamp of when the member role was created.
    description str
    Description of the member role.
    edit_path str
    The Web UI path to edit the member role
    enabled_permissions Sequence[str]
    All permissions enabled for the custom role.
    id str
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    iid int
    The member role ID integer value extracted from the id attribute
    name str
    Name of the member role.
    baseAccessLevel String
    The base access level of the custom role.
    createdAt String
    Timestamp of when the member role was created.
    description String
    Description of the member role.
    editPath String
    The Web UI path to edit the member role
    enabledPermissions List<String>
    All permissions enabled for the custom role.
    id String
    Globally unique ID of the member role. In the format of gid://gitlab/MemberRole/1
    iid Number
    The member role ID integer value extracted from the id attribute
    name String
    Name of the member role.

    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 v9.5.0 published on Saturday, Nov 22, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate