1. Packages
  2. Alicloud Provider
  3. API Docs
  4. ram
  5. LoginProfile
Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi

alicloud.ram.LoginProfile

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi

    Provides a RAM User Login Profile resource.

    For information about RAM User Login Profile and how to use it, see What is Login Profile.

    NOTE: Available since v1.0.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const user = new alicloud.ram.User("user", {
        name: "terraform_example",
        displayName: "terraform_example",
        mobile: "86-18688888888",
        email: "hello.uuu@aaa.com",
        comments: "terraform_example",
        force: true,
    });
    const profile = new alicloud.ram.LoginProfile("profile", {
        userName: user.name,
        password: "Example_1234",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    user = alicloud.ram.User("user",
        name="terraform_example",
        display_name="terraform_example",
        mobile="86-18688888888",
        email="hello.uuu@aaa.com",
        comments="terraform_example",
        force=True)
    profile = alicloud.ram.LoginProfile("profile",
        user_name=user.name,
        password="Example_1234")
    
    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 {
    		user, err := ram.NewUser(ctx, "user", &ram.UserArgs{
    			Name:        pulumi.String("terraform_example"),
    			DisplayName: pulumi.String("terraform_example"),
    			Mobile:      pulumi.String("86-18688888888"),
    			Email:       pulumi.String("hello.uuu@aaa.com"),
    			Comments:    pulumi.String("terraform_example"),
    			Force:       pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ram.NewLoginProfile(ctx, "profile", &ram.LoginProfileArgs{
    			UserName: user.Name,
    			Password: pulumi.String("Example_1234"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var user = new AliCloud.Ram.User("user", new()
        {
            Name = "terraform_example",
            DisplayName = "terraform_example",
            Mobile = "86-18688888888",
            Email = "hello.uuu@aaa.com",
            Comments = "terraform_example",
            Force = true,
        });
    
        var profile = new AliCloud.Ram.LoginProfile("profile", new()
        {
            UserName = user.Name,
            Password = "Example_1234",
        });
    
    });
    
    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 com.pulumi.alicloud.ram.LoginProfile;
    import com.pulumi.alicloud.ram.LoginProfileArgs;
    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()
                .name("terraform_example")
                .displayName("terraform_example")
                .mobile("86-18688888888")
                .email("hello.uuu@aaa.com")
                .comments("terraform_example")
                .force(true)
                .build());
    
            var profile = new LoginProfile("profile", LoginProfileArgs.builder()
                .userName(user.name())
                .password("Example_1234")
                .build());
    
        }
    }
    
    resources:
      user:
        type: alicloud:ram:User
        properties:
          name: terraform_example
          displayName: terraform_example
          mobile: 86-18688888888
          email: hello.uuu@aaa.com
          comments: terraform_example
          force: true
      profile:
        type: alicloud:ram:LoginProfile
        properties:
          userName: ${user.name}
          password: Example_1234
    

    Create LoginProfile Resource

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

    Constructor syntax

    new LoginProfile(name: string, args: LoginProfileArgs, opts?: CustomResourceOptions);
    @overload
    def LoginProfile(resource_name: str,
                     args: LoginProfileArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def LoginProfile(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     password: Optional[str] = None,
                     user_name: Optional[str] = None,
                     mfa_bind_required: Optional[bool] = None,
                     password_reset_required: Optional[bool] = None)
    func NewLoginProfile(ctx *Context, name string, args LoginProfileArgs, opts ...ResourceOption) (*LoginProfile, error)
    public LoginProfile(string name, LoginProfileArgs args, CustomResourceOptions? opts = null)
    public LoginProfile(String name, LoginProfileArgs args)
    public LoginProfile(String name, LoginProfileArgs args, CustomResourceOptions options)
    
    type: alicloud:ram:LoginProfile
    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 LoginProfileArgs
    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 LoginProfileArgs
    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 LoginProfileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LoginProfileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LoginProfileArgs
    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 loginProfileResource = new AliCloud.Ram.LoginProfile("loginProfileResource", new()
    {
        Password = "string",
        UserName = "string",
        MfaBindRequired = false,
        PasswordResetRequired = false,
    });
    
    example, err := ram.NewLoginProfile(ctx, "loginProfileResource", &ram.LoginProfileArgs{
    	Password:              pulumi.String("string"),
    	UserName:              pulumi.String("string"),
    	MfaBindRequired:       pulumi.Bool(false),
    	PasswordResetRequired: pulumi.Bool(false),
    })
    
    var loginProfileResource = new LoginProfile("loginProfileResource", LoginProfileArgs.builder()
        .password("string")
        .userName("string")
        .mfaBindRequired(false)
        .passwordResetRequired(false)
        .build());
    
    login_profile_resource = alicloud.ram.LoginProfile("loginProfileResource",
        password="string",
        user_name="string",
        mfa_bind_required=False,
        password_reset_required=False)
    
    const loginProfileResource = new alicloud.ram.LoginProfile("loginProfileResource", {
        password: "string",
        userName: "string",
        mfaBindRequired: false,
        passwordResetRequired: false,
    });
    
    type: alicloud:ram:LoginProfile
    properties:
        mfaBindRequired: false
        password: string
        passwordResetRequired: false
        userName: string
    

    LoginProfile 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 LoginProfile resource accepts the following input properties:

    Password string
    The logon password of the RAM user. The password must meet the password strength requirements.
    UserName string
    The 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.
    MfaBindRequired bool
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    PasswordResetRequired bool
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    Password string
    The logon password of the RAM user. The password must meet the password strength requirements.
    UserName string
    The 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.
    MfaBindRequired bool
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    PasswordResetRequired bool
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    password String
    The logon password of the RAM user. The password must meet the password strength requirements.
    userName String
    The 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.
    mfaBindRequired Boolean
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    passwordResetRequired Boolean
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    password string
    The logon password of the RAM user. The password must meet the password strength requirements.
    userName string
    The 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.
    mfaBindRequired boolean
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    passwordResetRequired boolean
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    password str
    The logon password of the RAM user. The password must meet the password strength requirements.
    user_name str
    The 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.
    mfa_bind_required bool
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    password_reset_required bool
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    password String
    The logon password of the RAM user. The password must meet the password strength requirements.
    userName String
    The 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.
    mfaBindRequired Boolean
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    passwordResetRequired Boolean
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LoginProfile 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 LoginProfile Resource

    Get an existing LoginProfile 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?: LoginProfileState, opts?: CustomResourceOptions): LoginProfile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            mfa_bind_required: Optional[bool] = None,
            password: Optional[str] = None,
            password_reset_required: Optional[bool] = None,
            user_name: Optional[str] = None) -> LoginProfile
    func GetLoginProfile(ctx *Context, name string, id IDInput, state *LoginProfileState, opts ...ResourceOption) (*LoginProfile, error)
    public static LoginProfile Get(string name, Input<string> id, LoginProfileState? state, CustomResourceOptions? opts = null)
    public static LoginProfile get(String name, Output<String> id, LoginProfileState 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:
    MfaBindRequired bool
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    Password string
    The logon password of the RAM user. The password must meet the password strength requirements.
    PasswordResetRequired bool
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    UserName string
    The 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.
    MfaBindRequired bool
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    Password string
    The logon password of the RAM user. The password must meet the password strength requirements.
    PasswordResetRequired bool
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    UserName string
    The 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.
    mfaBindRequired Boolean
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    password String
    The logon password of the RAM user. The password must meet the password strength requirements.
    passwordResetRequired Boolean
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    userName String
    The 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.
    mfaBindRequired boolean
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    password string
    The logon password of the RAM user. The password must meet the password strength requirements.
    passwordResetRequired boolean
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    userName string
    The 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.
    mfa_bind_required bool
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    password str
    The logon password of the RAM user. The password must meet the password strength requirements.
    password_reset_required bool
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    user_name str
    The 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.
    mfaBindRequired Boolean
    Specifies whether an MFA device must be attached to the RAM user upon logon. Valid values: true, false. To enhance the security of your resources and data, the default value has been changed to true .
    password String
    The logon password of the RAM user. The password must meet the password strength requirements.
    passwordResetRequired Boolean
    Specifies whether the RAM user must change the password upon logon. Default value: false. Valid values: true, false.
    userName String
    The 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 login profile can be imported using the id, e.g.

    $ pulumi import alicloud:ram/loginProfile:LoginProfile example <id>
    

    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.63.0 published on Monday, Sep 30, 2024 by Pulumi