Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

getUser

Provides information about a Linode user

Attributes

The Linode User resource exports the following attributes:

  • ssh_keys - A list of SSH Key labels added by this User. These are the keys that will be deployed if this User is included in the authorized_users field of a create Linode, rebuild Linode, or create Disk request.

  • email - The email address for this User, for account management communications, and may be used for other communications as configured.

  • restricted - If true, this User must be granted access to perform actions or access entities on this Account.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

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

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := linode.LookupUser(ctx, &GetUserArgs{
			Username: "foo",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_linode as linode

foo = linode.get_user(username="foo")
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const foo = pulumi.output(linode.getUser({
    username: "foo",
}));

Using getUser

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 getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOptions): Output<GetUserResult>
def get_user(username: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(username: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput

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

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

The following arguments are supported:

Username string
The unique username of this User.
Username string
The unique username of this User.
username string
The unique username of this User.
username str
The unique username of this User.

getUser Result

The following output properties are available:

Email string
Id string
The provider-assigned unique ID for this managed resource.
Restricted bool
SshKeys List<string>
Username string
Email string
Id string
The provider-assigned unique ID for this managed resource.
Restricted bool
SshKeys []string
Username string
email string
id string
The provider-assigned unique ID for this managed resource.
restricted boolean
sshKeys string[]
username string
email str
id str
The provider-assigned unique ID for this managed resource.
restricted bool
ssh_keys Sequence[str]
username str

Package Details

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