1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getProjectMembership
GitLab v8.11.0 published on Friday, Apr 18, 2025 by Pulumi

gitlab.getProjectMembership

Explore with Pulumi AI

GitLab v8.11.0 published on Friday, Apr 18, 2025 by Pulumi

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

Note exactly one of project_id or full_path must be provided.

Upstream API: GitLab REST API docs

Using getProjectMembership

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 getProjectMembership(args: GetProjectMembershipArgs, opts?: InvokeOptions): Promise<GetProjectMembershipResult>
function getProjectMembershipOutput(args: GetProjectMembershipOutputArgs, opts?: InvokeOptions): Output<GetProjectMembershipResult>
Copy
def get_project_membership(full_path: Optional[str] = None,
                           inherited: Optional[bool] = None,
                           project_id: Optional[int] = None,
                           query: Optional[str] = None,
                           user_ids: Optional[Sequence[int]] = None,
                           opts: Optional[InvokeOptions] = None) -> GetProjectMembershipResult
def get_project_membership_output(full_path: Optional[pulumi.Input[str]] = None,
                           inherited: Optional[pulumi.Input[bool]] = None,
                           project_id: Optional[pulumi.Input[int]] = None,
                           query: Optional[pulumi.Input[str]] = None,
                           user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetProjectMembershipResult]
Copy
func LookupProjectMembership(ctx *Context, args *LookupProjectMembershipArgs, opts ...InvokeOption) (*LookupProjectMembershipResult, error)
func LookupProjectMembershipOutput(ctx *Context, args *LookupProjectMembershipOutputArgs, opts ...InvokeOption) LookupProjectMembershipResultOutput
Copy

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

public static class GetProjectMembership 
{
    public static Task<GetProjectMembershipResult> InvokeAsync(GetProjectMembershipArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectMembershipResult> Invoke(GetProjectMembershipInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetProjectMembershipResult> getProjectMembership(GetProjectMembershipArgs args, InvokeOptions options)
public static Output<GetProjectMembershipResult> getProjectMembership(GetProjectMembershipArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gitlab:index/getProjectMembership:getProjectMembership
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

FullPath string
The full path of the project.
Inherited bool
Return all project members including members through ancestor groups
ProjectId int
The ID of the project.
Query string
A query string to search for members
UserIds List<int>
List of user ids to filter members by
FullPath string
The full path of the project.
Inherited bool
Return all project members including members through ancestor groups
ProjectId int
The ID of the project.
Query string
A query string to search for members
UserIds []int
List of user ids to filter members by
fullPath String
The full path of the project.
inherited Boolean
Return all project members including members through ancestor groups
projectId Integer
The ID of the project.
query String
A query string to search for members
userIds List<Integer>
List of user ids to filter members by
fullPath string
The full path of the project.
inherited boolean
Return all project members including members through ancestor groups
projectId number
The ID of the project.
query string
A query string to search for members
userIds number[]
List of user ids to filter members by
full_path str
The full path of the project.
inherited bool
Return all project members including members through ancestor groups
project_id int
The ID of the project.
query str
A query string to search for members
user_ids Sequence[int]
List of user ids to filter members by
fullPath String
The full path of the project.
inherited Boolean
Return all project members including members through ancestor groups
projectId Number
The ID of the project.
query String
A query string to search for members
userIds List<Number>
List of user ids to filter members by

getProjectMembership Result

The following output properties are available:

FullPath string
The full path of the project.
Id string
The provider-assigned unique ID for this managed resource.
Members List<Pulumi.GitLab.Outputs.GetProjectMembershipMember>
The list of project members.
ProjectId int
The ID of the project.
Inherited bool
Return all project members including members through ancestor groups
Query string
A query string to search for members
UserIds List<int>
List of user ids to filter members by
FullPath string
The full path of the project.
Id string
The provider-assigned unique ID for this managed resource.
Members []GetProjectMembershipMember
The list of project members.
ProjectId int
The ID of the project.
Inherited bool
Return all project members including members through ancestor groups
Query string
A query string to search for members
UserIds []int
List of user ids to filter members by
fullPath String
The full path of the project.
id String
The provider-assigned unique ID for this managed resource.
members List<GetProjectMembershipMember>
The list of project members.
projectId Integer
The ID of the project.
inherited Boolean
Return all project members including members through ancestor groups
query String
A query string to search for members
userIds List<Integer>
List of user ids to filter members by
fullPath string
The full path of the project.
id string
The provider-assigned unique ID for this managed resource.
members GetProjectMembershipMember[]
The list of project members.
projectId number
The ID of the project.
inherited boolean
Return all project members including members through ancestor groups
query string
A query string to search for members
userIds number[]
List of user ids to filter members by
full_path str
The full path of the project.
id str
The provider-assigned unique ID for this managed resource.
members Sequence[GetProjectMembershipMember]
The list of project members.
project_id int
The ID of the project.
inherited bool
Return all project members including members through ancestor groups
query str
A query string to search for members
user_ids Sequence[int]
List of user ids to filter members by
fullPath String
The full path of the project.
id String
The provider-assigned unique ID for this managed resource.
members List<Property Map>
The list of project members.
projectId Number
The ID of the project.
inherited Boolean
Return all project members including members through ancestor groups
query String
A query string to search for members
userIds List<Number>
List of user ids to filter members by

Supporting Types

GetProjectMembershipMember

AccessLevel This property is required. string
The level of access to the group.
AvatarUrl This property is required. string
The avatar URL of the user.
ExpiresAt This property is required. string
Expiration date for the group membership.
Id This property is required. int
The unique id assigned to the user by the gitlab server.
Name This property is required. string
The name of the user.
State This property is required. string
Whether the user is active or blocked.
Username This property is required. string
The username of the user.
WebUrl This property is required. string
User's website URL.
AccessLevel This property is required. string
The level of access to the group.
AvatarUrl This property is required. string
The avatar URL of the user.
ExpiresAt This property is required. string
Expiration date for the group membership.
Id This property is required. int
The unique id assigned to the user by the gitlab server.
Name This property is required. string
The name of the user.
State This property is required. string
Whether the user is active or blocked.
Username This property is required. string
The username of the user.
WebUrl This property is required. string
User's website URL.
accessLevel This property is required. String
The level of access to the group.
avatarUrl This property is required. String
The avatar URL of the user.
expiresAt This property is required. String
Expiration date for the group membership.
id This property is required. Integer
The unique id assigned to the user by the gitlab server.
name This property is required. String
The name of the user.
state This property is required. String
Whether the user is active or blocked.
username This property is required. String
The username of the user.
webUrl This property is required. String
User's website URL.
accessLevel This property is required. string
The level of access to the group.
avatarUrl This property is required. string
The avatar URL of the user.
expiresAt This property is required. string
Expiration date for the group membership.
id This property is required. number
The unique id assigned to the user by the gitlab server.
name This property is required. string
The name of the user.
state This property is required. string
Whether the user is active or blocked.
username This property is required. string
The username of the user.
webUrl This property is required. string
User's website URL.
access_level This property is required. str
The level of access to the group.
avatar_url This property is required. str
The avatar URL of the user.
expires_at This property is required. str
Expiration date for the group membership.
id This property is required. int
The unique id assigned to the user by the gitlab server.
name This property is required. str
The name of the user.
state This property is required. str
Whether the user is active or blocked.
username This property is required. str
The username of the user.
web_url This property is required. str
User's website URL.
accessLevel This property is required. String
The level of access to the group.
avatarUrl This property is required. String
The avatar URL of the user.
expiresAt This property is required. String
Expiration date for the group membership.
id This property is required. Number
The unique id assigned to the user by the gitlab server.
name This property is required. String
The name of the user.
state This property is required. String
Whether the user is active or blocked.
username This property is required. String
The username of the user.
webUrl This property is required. String
User's website URL.

Package Details

Repository
GitLab pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.
GitLab v8.11.0 published on Friday, Apr 18, 2025 by Pulumi