CreateLoginProfile

Last Updated: Nov 10, 2017

Interface description

Enables web console login mode for an RAM user.

Request parameters

Action

  • Type: String
  • Required: Yes
  • Description: Operation interface, required. The parameter value is “CreateLoginProfile”.

UserName

  • Type: String
  • Required: Yes
  • Description: User name.

Password

  • Type: String
  • Required: Yes
  • Description: Password. The password must have the required password strength. To disable the interface for setting the password strength, refer to <Set user password policies>.

PasswordResetRequired

  • Type: Boolean
  • Required: No
  • Default value: “False”.
  • Description: Determines whether you need to change the password upon login.

MFABindRequired

  • Type: Boolean
  • Required: No
  • Default value: “False”.
  • Description: Determines whether you need to bind to an MFA device upon next login.

Return parameters

LoginProfile

Required permissions

Action

ram:CreateLoginProfile

Resource

acs:ram:*:${AccountId}:user/${UserName}

Error messages

InvalidParameter.UserName.InvalidChars
  • HTTP Status: 400
  • Error Message: The parameter - “UserName” contains invalid chars.
InvalidParameter.UserName.Length
  • HTTP Status: 400
  • Error Message: The parameter - “UserName” beyond the length limit.
InvalidParameter.Password.TooWeak
  • HTTP Status: 400
  • Error Message: The parameter - “Password” is not compliant with the password policy.
EntityNotExist.User
  • HTTP Status: 404
  • Error Message: The user does not exist.
EntityAlreadyExists.User.LoginProfile
  • HTTP Status: 409
  • Error Message: The user login profile does already EXIST.

Operation examples

Request example

  1. https://ram.aliyuncs.com/?Action=CreateLoginProfile
  2. &UserName=zhangqiang
  3. &Password=mypassword
  4. &PasswordResetRequired=true
  5. &<Public request parameters>

Return example

XML format

  1. <CreateLoginProfile>
  2. <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
  3. <LoginProfile>
  4. <UserName>zhangqiang</UserName>
  5. <PasswordResetRequired>true</PasswordResetRequired>
  6. <MFABindRequired>true</MFABindRequired>
  7. <CreateDate>2015-01-23T12:33:18Z</CreateDate>
  8. </LoginProfile>
  9. </CreateLoginProfile>

JSON format

  1. {
  2. "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  3. "LoginProfile": {
  4. "UserName": "zhangqiang",
  5. "PasswordResetRequired": true,
  6. "MFABindRequired": true,
  7. "CreateDate": "2015-01-23T12:33:18Z"
  8. }
  9. }
Thank you! We've received your feedback.