Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

getUser

Use this data source to retrieve information about a Rancher v2 user

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

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

}
package main

import (
    "github.com/pulumi/pulumi-rancher2/sdk/v2/go/rancher2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

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

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

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

Using getUser

function getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
def get_user(is_external: Optional[bool] = None, name: Optional[str] = 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:

IsExternal bool

Set is the user if the user is external. Default: false (bool)

Name string

The name of the user (string)

Username string

The username of the user (string)

IsExternal bool

Set is the user if the user is external. Default: false (bool)

Name string

The name of the user (string)

Username string

The username of the user (string)

isExternal boolean

Set is the user if the user is external. Default: false (bool)

name string

The name of the user (string)

username string

The username of the user (string)

is_external bool

Set is the user if the user is external. Default: false (bool)

name str

The name of the user (string)

username str

The username of the user (string)

getUser Result

The following output properties are available:

Annotations Dictionary<string, object>

(Computed) Annotations of the resource (map)

Enabled bool

(Computed) The user is enabled (bool)

Id string

The provider-assigned unique ID for this managed resource.

Labels Dictionary<string, object>

(Computed) Labels of the resource (map)

Name string

(Computed) The user common name (string)

PrincipalIds List<string>

(Computed) The user principal IDs (list)

Username string
IsExternal bool
Annotations map[string]interface{}

(Computed) Annotations of the resource (map)

Enabled bool

(Computed) The user is enabled (bool)

Id string

The provider-assigned unique ID for this managed resource.

Labels map[string]interface{}

(Computed) Labels of the resource (map)

Name string

(Computed) The user common name (string)

PrincipalIds []string

(Computed) The user principal IDs (list)

Username string
IsExternal bool
annotations {[key: string]: any}

(Computed) Annotations of the resource (map)

enabled boolean

(Computed) The user is enabled (bool)

id string

The provider-assigned unique ID for this managed resource.

labels {[key: string]: any}

(Computed) Labels of the resource (map)

name string

(Computed) The user common name (string)

principalIds string[]

(Computed) The user principal IDs (list)

username string
isExternal boolean
annotations Mapping[str, Any]

(Computed) Annotations of the resource (map)

enabled bool

(Computed) The user is enabled (bool)

id str

The provider-assigned unique ID for this managed resource.

labels Mapping[str, Any]

(Computed) Labels of the resource (map)

name str

(Computed) The user common name (string)

principal_ids Sequence[str]

(Computed) The user principal IDs (list)

username str
is_external bool

Package Details

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