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,
});
}
}
Inherited Members
Namespace: Pulumi.Rancher2
Assembly: Pulumi.Rancher2.dll
Syntax
public class User : CustomResource
Constructors
View SourceUser(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 SourceAnnotations
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>> |
Enabled
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
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>> |
Name
The user full name (string)
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Password
The user password (string)
Declaration
public Output<string> Password { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
Username
The user username (string)
Declaration
public Output<string> Username { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(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 |