getUser

# gitlab_user

Provides details about a specific user in the gitlab provider. Especially the ability to lookup the id for linking to other resources.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(GitLab.GetUser.InvokeAsync(new GitLab.GetUserArgs
        {
            Username = "myuser",
        }));
    }

}
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 := "myuser"
		_, err := gitlab.LookupUser(ctx, &gitlab.LookupUserArgs{
			Username: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gitlab as gitlab

example = gitlab.get_user(username="myuser")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const example = pulumi.output(gitlab.getUser({
    username: "myuser",
}, { async: true }));

Using getUser

function getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
def get_user(email: Optional[str] = None,
             user_id: Optional[int] = None,
             username: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetUserResult
func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)

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

public static class GetUser {
    public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Email string
The e-mail address of the user. (Requires administrator privileges)
UserId int
The ID of the user.
Username string
The username of the user.
Email string
The e-mail address of the user. (Requires administrator privileges)
UserId int
The ID of the user.
Username string
The username of the user.
email string
The e-mail address of the user. (Requires administrator privileges)
userId number
The ID of the user.
username string
The username of the user.
email str
The e-mail address of the user. (Requires administrator privileges)
user_id int
The ID of the user.
username str
The username of the user.

getUser Result

The following output properties are available:

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
The external UID of the user.
External bool
Whether the user is external.
Id string
The provider-assigned unique ID for this managed resource.
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.
Note string
Organization string
The organization of the user.
ProjectsLimit int
Number of projects the user can create.
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.
UserId int
UserProvider string
The UID provider of the user.
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
The external UID of the user.
External bool
Whether the user is external.
Id string
The provider-assigned unique ID for this managed resource.
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.
Note string
Organization string
The organization of the user.
ProjectsLimit int
Number of projects the user can create.
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.
UserId int
UserProvider string
The UID provider of the user.
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
The external UID of the user.
external boolean
Whether the user is external.
id string
The provider-assigned unique ID for this managed resource.
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.
note string
organization string
The organization of the user.
projectsLimit number
Number of projects the user can create.
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.
userId number
userProvider string
The UID provider of the user.
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
The external UID of the user.
external bool
Whether the user is external.
id str
The provider-assigned unique ID for this managed resource.
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.
note str
organization str
The organization of the user.
projects_limit int
Number of projects the user can create.
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.
user_id int
user_provider str
The UID provider of the user.
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.