1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ram
  5. User
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.ram.User

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    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", {
        comments: "yoyoyo",
        displayName: "user_display_name",
        email: "hello.uuu@aaa.com",
        mobile: "86-18688888888",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    # Create a new RAM user.
    user = alicloud.ram.User("user",
        comments="yoyoyo",
        display_name="user_display_name",
        email="hello.uuu@aaa.com",
        mobile="86-18688888888")
    
    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{
    			Comments:    pulumi.String("yoyoyo"),
    			DisplayName: pulumi.String("user_display_name"),
    			Email:       pulumi.String("hello.uuu@aaa.com"),
    			Mobile:      pulumi.String("86-18688888888"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()
        {
            Comments = "yoyoyo",
            DisplayName = "user_display_name",
            Email = "hello.uuu@aaa.com",
            Mobile = "86-18688888888",
        });
    
    });
    
    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) {
            var user = new User("user", UserArgs.builder()        
                .comments("yoyoyo")
                .displayName("user_display_name")
                .email("hello.uuu@aaa.com")
                .mobile("86-18688888888")
                .build());
    
        }
    }
    
    resources:
      # Create a new RAM user.
      user:
        type: alicloud:ram:User
        properties:
          comments: yoyoyo
          displayName: user_display_name
          email: hello.uuu@aaa.com
          mobile: 86-18688888888
    

    Create User Resource

    new User(name: string, args?: UserArgs, opts?: CustomResourceOptions);
    @overload
    def User(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             comments: Optional[str] = None,
             display_name: Optional[str] = None,
             email: Optional[str] = None,
             force: Optional[bool] = None,
             mobile: Optional[str] = None,
             name: Optional[str] = None)
    @overload
    def User(resource_name: str,
             args: Optional[UserArgs] = None,
             opts: Optional[ResourceOptions] = None)
    func NewUser(ctx *Context, name string, args *UserArgs, opts ...ResourceOption) (*User, error)
    public User(string name, UserArgs? args = null, CustomResourceOptions? opts = null)
    public User(String name, UserArgs args)
    public User(String name, UserArgs args, CustomResourceOptions options)
    
    type: alicloud:ram:User
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    User Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The User resource accepts the following input properties:

    Comments string
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    DisplayName string
    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.
    Email string
    Email of the RAM user.
    Force bool
    This parameter is used for resource destroy. Default value: false.
    Mobile string
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    Name string
    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.
    Comments string
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    DisplayName string
    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.
    Email string
    Email of the RAM user.
    Force bool
    This parameter is used for resource destroy. Default value: false.
    Mobile string
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    Name string
    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.
    comments String
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    displayName String
    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.
    email String
    Email of the RAM user.
    force Boolean
    This parameter is used for resource destroy. Default value: false.
    mobile String
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    name String
    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.
    comments string
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    displayName string
    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.
    email string
    Email of the RAM user.
    force boolean
    This parameter is used for resource destroy. Default value: false.
    mobile string
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    name string
    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.
    comments str
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    display_name str
    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.
    email str
    Email of the RAM user.
    force bool
    This parameter is used for resource destroy. Default value: false.
    mobile str
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    name str
    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.
    comments String
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    displayName String
    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.
    email String
    Email of the RAM user.
    force Boolean
    This parameter is used for resource destroy. Default value: false.
    mobile String
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    name String
    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing User Resource

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

    public static get(name: string, id: Input<ID>, state?: UserState, opts?: CustomResourceOptions): User
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comments: Optional[str] = None,
            display_name: Optional[str] = None,
            email: Optional[str] = None,
            force: Optional[bool] = None,
            mobile: Optional[str] = None,
            name: Optional[str] = None) -> User
    func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
    public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
    public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Comments string
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    DisplayName string
    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.
    Email string
    Email of the RAM user.
    Force bool
    This parameter is used for resource destroy. Default value: false.
    Mobile string
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    Name string
    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.
    Comments string
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    DisplayName string
    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.
    Email string
    Email of the RAM user.
    Force bool
    This parameter is used for resource destroy. Default value: false.
    Mobile string
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    Name string
    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.
    comments String
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    displayName String
    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.
    email String
    Email of the RAM user.
    force Boolean
    This parameter is used for resource destroy. Default value: false.
    mobile String
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    name String
    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.
    comments string
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    displayName string
    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.
    email string
    Email of the RAM user.
    force boolean
    This parameter is used for resource destroy. Default value: false.
    mobile string
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    name string
    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.
    comments str
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    display_name str
    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.
    email str
    Email of the RAM user.
    force bool
    This parameter is used for resource destroy. Default value: false.
    mobile str
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    name str
    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.
    comments String
    Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
    displayName String
    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.
    email String
    Email of the RAM user.
    force Boolean
    This parameter is used for resource destroy. Default value: false.
    mobile String
    Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
    name String
    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.

    Import

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

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi