Show / Hide Table of Contents

Class User

Provides a Rancher v2 User resource. This can be used to create Users for Rancher v2 environments and retrieve their information.

When a Rancher User is created, it doesn't have a global role binding. At least, user-base global role binding in needed in order to enable user login.

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

class MyStack : Stack
{
public MyStack()
{
    // Create a new rancher2 User
    var fooUser = new Rancher2.User("fooUser", new Rancher2.UserArgs
    {
        Enabled = true,
        Password = "changeme",
        Username = "foo",
    });
    // Create a new rancher2 global_role_binding for User
    var fooGlobalRoleBinding = new Rancher2.GlobalRoleBinding("fooGlobalRoleBinding", new Rancher2.GlobalRoleBindingArgs
    {
        GlobalRoleId = "user-base",
        UserId = fooUser.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
User
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Rancher2
Assembly: Pulumi.Rancher2.dll
Syntax
public class User : CustomResource

Constructors

View Source

User(String, UserArgs, CustomResourceOptions)

Create a User resource with the given unique name, arguments, and options.

Declaration
public User(string name, UserArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

UserArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Annotations

Annotations for global role binding (map)

Declaration
public Output<ImmutableDictionary<string, object>> Annotations { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

Enabled

Declaration
public Output<bool?> Enabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Labels

Labels for global role binding (map)

Declaration
public Output<ImmutableDictionary<string, object>> Labels { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

Name

The user full name (string)

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Password

The user password (string)

Declaration
public Output<string> Password { get; }
Property Value
Type Description
Output<System.String>
View Source

PrincipalIds

(Computed) The user principal IDs (list)

Declaration
public Output<ImmutableArray<string>> PrincipalIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Username

The user username (string)

Declaration
public Output<string> Username { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, UserState, CustomResourceOptions)

Get an existing User resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static User Get(string name, Input<string> id, UserState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

UserState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
User
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.