alicloud.ram.LoginProfile
Explore with Pulumi AI
Provides a RAM Login Profile resource.
For information about RAM 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The LoginProfile resource accepts the following input properties:
- Password string
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- User
Name string - The user name.
- Mfa
Bind boolRequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- Password
Reset boolRequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- Password string
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- User
Name string - The user name.
- Mfa
Bind boolRequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- Password
Reset boolRequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- password String
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- user
Name String - The user name.
- mfa
Bind BooleanRequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- password
Reset BooleanRequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- password string
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- user
Name string - The user name.
- mfa
Bind booleanRequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- password
Reset booleanRequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- password str
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- user_
name str - The user name.
- mfa_
bind_ boolrequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- password_
reset_ boolrequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- password String
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- user
Name String - The user name.
- mfa
Bind BooleanRequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- password
Reset BooleanRequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
Outputs
All input properties are implicitly available as output properties. Additionally, the LoginProfile resource produces the following output properties:
- Create
Time string - Creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - Creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - Creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time string - Creation time.
- id string
- The provider-assigned unique ID for this managed resource.
- create_
time str - Creation time.
- id str
- The provider-assigned unique ID for this managed resource.
- create
Time String - Creation time.
- 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,
create_time: Optional[str] = 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)
resources: _: type: alicloud:ram:LoginProfile get: id: ${id}
- 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.
- Create
Time string - Creation time.
- Mfa
Bind boolRequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- Password string
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- Password
Reset boolRequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- User
Name string - The user name.
- Create
Time string - Creation time.
- Mfa
Bind boolRequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- Password string
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- Password
Reset boolRequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- User
Name string - The user name.
- create
Time String - Creation time.
- mfa
Bind BooleanRequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- password String
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- password
Reset BooleanRequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- user
Name String - The user name.
- create
Time string - Creation time.
- mfa
Bind booleanRequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- password string
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- password
Reset booleanRequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- user
Name string - The user name.
- create_
time str - Creation time.
- mfa_
bind_ boolrequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- password str
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- password_
reset_ boolrequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- user_
name str - The user name.
- create
Time String - Creation time.
- mfa
Bind BooleanRequired - Specifies whether to forcefully enable multi-factor authentication (MFA) for the RAM user. Valid values:
- true: forcefully enables MFA for the RAM user. The RAM user must bind an MFA device upon the next logon.
- false (default): does not forcefully enable MFA for the RAM user.
- password String
- The password must meet the Password strength requirements. For more information about password strength setting requirements, see GetPasswordPolicy.
- password
Reset BooleanRequired - Whether the user must reset the password at the next logon. Value:
- true
- false (default)
- user
Name String - The user name.
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.