1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ram
  5. User
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.ram.User

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 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", {
        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")
    
    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
    	})
    }
    
    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 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
    

    Create User Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new User(name: string, args?: UserArgs, opts?: CustomResourceOptions);
    @overload
    def User(resource_name: str,
             args: Optional[UserArgs] = None,
             opts: Optional[ResourceOptions] = None)
    
    @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)
    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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var exampleuserResourceResourceFromRamuser = new AliCloud.Ram.User("exampleuserResourceResourceFromRamuser", new()
    {
        Comments = "string",
        DisplayName = "string",
        Email = "string",
        Force = false,
        Mobile = "string",
        Name = "string",
    });
    
    example, err := ram.NewUser(ctx, "exampleuserResourceResourceFromRamuser", &ram.UserArgs{
    	Comments:    pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	Email:       pulumi.String("string"),
    	Force:       pulumi.Bool(false),
    	Mobile:      pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var exampleuserResourceResourceFromRamuser = new User("exampleuserResourceResourceFromRamuser", UserArgs.builder()
        .comments("string")
        .displayName("string")
        .email("string")
        .force(false)
        .mobile("string")
        .name("string")
        .build());
    
    exampleuser_resource_resource_from_ramuser = alicloud.ram.User("exampleuserResourceResourceFromRamuser",
        comments="string",
        display_name="string",
        email="string",
        force=False,
        mobile="string",
        name="string")
    
    const exampleuserResourceResourceFromRamuser = new alicloud.ram.User("exampleuserResourceResourceFromRamuser", {
        comments: "string",
        displayName: "string",
        email: "string",
        force: false,
        mobile: "string",
        name: "string",
    });
    
    type: alicloud:ram:User
    properties:
        comments: string
        displayName: string
        email: string
        force: false
        mobile: string
        name: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi