UserArgs

data class UserArgs(val comments: Output<String>? = null, val displayName: Output<String>? = null, val email: Output<String>? = null, val force: Output<Boolean>? = null, val mobile: Output<String>? = null, val name: Output<String>? = null) : ConvertibleToJava<UserArgs>

Provides a RAM User resource. For information about RAM User and how to use it, see What is User.

NOTE: When you want to destroy this resource forcefully(means release all the relationships associated with it automatically and then destroy it) without set force with true at beginning, you need add force = true to configuration file and run pulumi preview, then you can delete resource forcefully. NOTE: Available since v1.0.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Create a new RAM user.
const user = new alicloud.ram.User("user", {
name: "terraform-example",
displayName: "user_display_name",
mobile: "86-18688888888",
email: "hello.uuu@aaa.com",
comments: "yoyoyo",
});
import pulumi
import pulumi_alicloud as alicloud
# Create a new RAM user.
user = alicloud.ram.User("user",
name="terraform-example",
display_name="user_display_name",
mobile="86-18688888888",
email="hello.uuu@aaa.com",
comments="yoyoyo")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Create a new RAM user.
var user = new AliCloud.Ram.User("user", new()
{
Name = "terraform-example",
DisplayName = "user_display_name",
Mobile = "86-18688888888",
Email = "hello.uuu@aaa.com",
Comments = "yoyoyo",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new RAM user.
_, err := ram.NewUser(ctx, "user", &ram.UserArgs{
Name: pulumi.String("terraform-example"),
DisplayName: pulumi.String("user_display_name"),
Mobile: pulumi.String("86-18688888888"),
Email: pulumi.String("hello.uuu@aaa.com"),
Comments: pulumi.String("yoyoyo"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ram.User;
import com.pulumi.alicloud.ram.UserArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Create a new RAM user.
var user = new User("user", UserArgs.builder()
.name("terraform-example")
.displayName("user_display_name")
.mobile("86-18688888888")
.email("hello.uuu@aaa.com")
.comments("yoyoyo")
.build());
}
}
resources:
# Create a new RAM user.
user:
type: alicloud:ram:User
properties:
name: terraform-example
displayName: user_display_name
mobile: 86-18688888888
email: hello.uuu@aaa.com
comments: yoyoyo

Import

RAM User can be imported using the id, e.g.

$ pulumi import alicloud:ram/user:User example 123456789xxx

Constructors

Link copied to clipboard
constructor(comments: Output<String>? = null, displayName: Output<String>? = null, email: Output<String>? = null, force: Output<Boolean>? = null, mobile: Output<String>? = null, name: Output<String>? = null)

Properties

Link copied to clipboard
val comments: Output<String>? = null

Comment of the RAM user. This parameter can have a string of 1 to 128 characters.

Link copied to clipboard
val displayName: Output<String>? = null

Name of the RAM user which for display. This name can have a string of 1 to 128 characters or Chinese characters, must contain only alphanumeric characters or Chinese characters or hyphens, such as "-",".", and must not end with a hyphen.

Link copied to clipboard
val email: Output<String>? = null

Email of the RAM user.

Link copied to clipboard
val force: Output<Boolean>? = null

This parameter is used for resource destroy. Default value: false.

Link copied to clipboard
val mobile: Output<String>? = null

Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.

Link copied to clipboard
val name: Output<String>? = null

Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.

Functions

Link copied to clipboard
open override fun toJava(): UserArgs