All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.ram.User Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.alicloud.ram;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.ram.UserArgs;
import com.pulumi.alicloud.ram.inputs.UserState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides a RAM User resource.
 * 
 * For information about RAM User and how to use it, see [What is User](https://www.alibabacloud.com/help/en/ram/developer-reference/api-ram-2015-05-01-createuser).
 * 
 * > **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
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         // 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}{@literal @}{@code aaa.com")
 *             .comments("yoyoyo")
 *             .build());
 * 
 *     }}{@code
 * }}{@code
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * RAM User can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:ram/user:User example 123456789xxx * ``` * */ @ResourceType(type="alicloud:ram/user:User") public class User extends com.pulumi.resources.CustomResource { /** * Comment of the RAM user. This parameter can have a string of 1 to 128 characters. * */ @Export(name="comments", refs={String.class}, tree="[0]") private Output comments; /** * @return Comment of the RAM user. This parameter can have a string of 1 to 128 characters. * */ public Output> comments() { return Codegen.optional(this.comments); } /** * 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. * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return 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. * */ public Output> displayName() { return Codegen.optional(this.displayName); } /** * Email of the RAM user. * */ @Export(name="email", refs={String.class}, tree="[0]") private Output email; /** * @return Email of the RAM user. * */ public Output> email() { return Codegen.optional(this.email); } /** * This parameter is used for resource destroy. Default value: `false`. * */ @Export(name="force", refs={Boolean.class}, tree="[0]") private Output force; /** * @return This parameter is used for resource destroy. Default value: `false`. * */ public Output> force() { return Codegen.optional(this.force); } /** * Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888. * */ @Export(name="mobile", refs={String.class}, tree="[0]") private Output mobile; /** * @return Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888. * */ public Output> mobile() { return Codegen.optional(this.mobile); } /** * 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. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return 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. * */ public Output name() { return this.name; } /** * * @param name The _unique_ name of the resulting resource. */ public User(java.lang.String name) { this(name, UserArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public User(java.lang.String name, @Nullable UserArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public User(java.lang.String name, @Nullable UserArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ram/user:User", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private User(java.lang.String name, Output id, @Nullable UserState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ram/user:User", name, state, makeResourceOptions(options, id), false); } private static UserArgs makeArgs(@Nullable UserArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? UserArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static User get(java.lang.String name, Output id, @Nullable UserState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new User(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy