getUsers

# gitlab_users

Provides details about a list of users in the gitlab provider. The results include id, username, email, name and more about the requested users. Users can also be sorted and filtered using several options.

NOTE: Some of the available options require administrator privileges. Please visit [Gitlab API documentation][users_for_admins] for more information.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(GitLab.GetUsers.InvokeAsync(new GitLab.GetUsersArgs
        {
            CreatedBefore = "2019-01-01",
            OrderBy = "name",
            Sort = "desc",
        }));
    }

}
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 {
		opt0 := "2019-01-01"
		opt1 := "name"
		opt2 := "desc"
		_, err := gitlab.GetUsers(ctx, &gitlab.GetUsersArgs{
			CreatedBefore: &opt0,
			OrderBy:       &opt1,
			Sort:          &opt2,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gitlab as gitlab

example = gitlab.get_users(created_before="2019-01-01",
    order_by="name",
    sort="desc")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const example = pulumi.output(gitlab.getUsers({
    createdBefore: "2019-01-01",
    orderBy: "name",
    sort: "desc",
}, { async: true }));

Using getUsers

function getUsers(args: GetUsersArgs, opts?: InvokeOptions): Promise<GetUsersResult>
def get_users(active: Optional[bool] = None,
              blocked: Optional[bool] = None,
              created_after: Optional[str] = None,
              created_before: Optional[str] = None,
              extern_provider: Optional[str] = None,
              extern_uid: Optional[str] = None,
              order_by: Optional[str] = None,
              search: Optional[str] = None,
              sort: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetUsersResult
func GetUsers(ctx *Context, args *GetUsersArgs, opts ...InvokeOption) (*GetUsersResult, error)

Note: This function is named GetUsers in the Go SDK.

public static class GetUsers {
    public static Task<GetUsersResult> InvokeAsync(GetUsersArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Active bool
Filter users that are active.
Blocked bool
Filter users that are blocked.
CreatedAfter string
Search for users created after a specific date. (Requires administrator privileges)
CreatedBefore string
Search for users created before a specific date. (Requires administrator privileges)
ExternProvider string
Lookup users by external provider. (Requires administrator privileges)
ExternUid string
Lookup users by external UID. (Requires administrator privileges)
OrderBy string
Order the users' list by id, name, username, created_at or updated_at. (Requires administrator privileges)
Search string
Search users by username, name or email.
Sort string
Sort users' list in asc or desc order. (Requires administrator privileges)
Active bool
Filter users that are active.
Blocked bool
Filter users that are blocked.
CreatedAfter string
Search for users created after a specific date. (Requires administrator privileges)
CreatedBefore string
Search for users created before a specific date. (Requires administrator privileges)
ExternProvider string
Lookup users by external provider. (Requires administrator privileges)
ExternUid string
Lookup users by external UID. (Requires administrator privileges)
OrderBy string
Order the users' list by id, name, username, created_at or updated_at. (Requires administrator privileges)
Search string
Search users by username, name or email.
Sort string
Sort users' list in asc or desc order. (Requires administrator privileges)
active boolean
Filter users that are active.
blocked boolean
Filter users that are blocked.
createdAfter string
Search for users created after a specific date. (Requires administrator privileges)
createdBefore string
Search for users created before a specific date. (Requires administrator privileges)
externProvider string
Lookup users by external provider. (Requires administrator privileges)
externUid string
Lookup users by external UID. (Requires administrator privileges)
orderBy string
Order the users' list by id, name, username, created_at or updated_at. (Requires administrator privileges)
search string
Search users by username, name or email.
sort string
Sort users' list in asc or desc order. (Requires administrator privileges)
active bool
Filter users that are active.
blocked bool
Filter users that are blocked.
created_after str
Search for users created after a specific date. (Requires administrator privileges)
created_before str
Search for users created before a specific date. (Requires administrator privileges)
extern_provider str
Lookup users by external provider. (Requires administrator privileges)
extern_uid str
Lookup users by external UID. (Requires administrator privileges)
order_by str
Order the users' list by id, name, username, created_at or updated_at. (Requires administrator privileges)
search str
Search users by username, name or email.
sort str
Sort users' list in asc or desc order. (Requires administrator privileges)

getUsers Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Users List<Pulumi.GitLab.Outputs.GetUsersUser>
The list of users.
Active bool
Blocked bool
CreatedAfter string
CreatedBefore string
ExternProvider string
ExternUid string
The external UID of the user.
OrderBy string
Search string
Sort string
Id string
The provider-assigned unique ID for this managed resource.
Users []GetUsersUser
The list of users.
Active bool
Blocked bool
CreatedAfter string
CreatedBefore string
ExternProvider string
ExternUid string
The external UID of the user.
OrderBy string
Search string
Sort string
id string
The provider-assigned unique ID for this managed resource.
users GetUsersUser[]
The list of users.
active boolean
blocked boolean
createdAfter string
createdBefore string
externProvider string
externUid string
The external UID of the user.
orderBy string
search string
sort string
id str
The provider-assigned unique ID for this managed resource.
users Sequence[GetUsersUser]
The list of users.
active bool
blocked bool
created_after str
created_before str
extern_provider str
extern_uid str
The external UID of the user.
order_by str
search str
sort str

Supporting Types

GetUsersUser

AvatarUrl string
The avatar URL of the user.
Bio string
The bio of the user.
CanCreateGroup bool
Whether the user can create groups.
CanCreateProject bool
Whether the user can create projects.
ColorSchemeId int
User’s color scheme ID.
CreatedAt string
Date the user was created at.
CurrentSignInAt string
Current user’s sign-in date.
Email string
The e-mail address of the user.
ExternUid string
Lookup users by external UID. (Requires administrator privileges)
External bool
Whether the user is external.
Id int
The unique id assigned to the user by the gitlab server.
IsAdmin bool
Whether the user is an admin.
LastSignInAt string
Last user’s sign-in date.
Linkedin string
Linkedin profile of the user.
Location string
The location of the user.
Name string
The name of the user.
Organization string
The organization of the user.
ProjectsLimit int
Number of projects the user can create.
Provider string
The UID provider of the user.
Skype string
Skype username of the user.
State string
Whether the user is active or blocked.
ThemeId int
User’s theme ID.
Twitter string
Twitter username of the user.
TwoFactorEnabled bool
Whether user’s two factor auth is enabled.
Username string
The username of the user.
WebsiteUrl string
User’s website URL.
AvatarUrl string
The avatar URL of the user.
Bio string
The bio of the user.
CanCreateGroup bool
Whether the user can create groups.
CanCreateProject bool
Whether the user can create projects.
ColorSchemeId int
User’s color scheme ID.
CreatedAt string
Date the user was created at.
CurrentSignInAt string
Current user’s sign-in date.
Email string
The e-mail address of the user.
ExternUid string
Lookup users by external UID. (Requires administrator privileges)
External bool
Whether the user is external.
Id int
The unique id assigned to the user by the gitlab server.
IsAdmin bool
Whether the user is an admin.
LastSignInAt string
Last user’s sign-in date.
Linkedin string
Linkedin profile of the user.
Location string
The location of the user.
Name string
The name of the user.
Organization string
The organization of the user.
ProjectsLimit int
Number of projects the user can create.
Provider string
The UID provider of the user.
Skype string
Skype username of the user.
State string
Whether the user is active or blocked.
ThemeId int
User’s theme ID.
Twitter string
Twitter username of the user.
TwoFactorEnabled bool
Whether user’s two factor auth is enabled.
Username string
The username of the user.
WebsiteUrl string
User’s website URL.
avatarUrl string
The avatar URL of the user.
bio string
The bio of the user.
canCreateGroup boolean
Whether the user can create groups.
canCreateProject boolean
Whether the user can create projects.
colorSchemeId number
User’s color scheme ID.
createdAt string
Date the user was created at.
currentSignInAt string
Current user’s sign-in date.
email string
The e-mail address of the user.
externUid string
Lookup users by external UID. (Requires administrator privileges)
external boolean
Whether the user is external.
id number
The unique id assigned to the user by the gitlab server.
isAdmin boolean
Whether the user is an admin.
lastSignInAt string
Last user’s sign-in date.
linkedin string
Linkedin profile of the user.
location string
The location of the user.
name string
The name of the user.
organization string
The organization of the user.
projectsLimit number
Number of projects the user can create.
provider string
The UID provider of the user.
skype string
Skype username of the user.
state string
Whether the user is active or blocked.
themeId number
User’s theme ID.
twitter string
Twitter username of the user.
twoFactorEnabled boolean
Whether user’s two factor auth is enabled.
username string
The username of the user.
websiteUrl string
User’s website URL.
avatar_url str
The avatar URL of the user.
bio str
The bio of the user.
can_create_group bool
Whether the user can create groups.
can_create_project bool
Whether the user can create projects.
color_scheme_id int
User’s color scheme ID.
created_at str
Date the user was created at.
current_sign_in_at str
Current user’s sign-in date.
email str
The e-mail address of the user.
extern_uid str
Lookup users by external UID. (Requires administrator privileges)
external bool
Whether the user is external.
id int
The unique id assigned to the user by the gitlab server.
is_admin bool
Whether the user is an admin.
last_sign_in_at str
Last user’s sign-in date.
linkedin str
Linkedin profile of the user.
location str
The location of the user.
name str
The name of the user.
organization str
The organization of the user.
projects_limit int
Number of projects the user can create.
provider str
The UID provider of the user.
skype str
Skype username of the user.
state str
Whether the user is active or blocked.
theme_id int
User’s theme ID.
twitter str
Twitter username of the user.
two_factor_enabled bool
Whether user’s two factor auth is enabled.
username str
The username of the user.
website_url str
User’s website URL.

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.