Creates a RAM user.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddAccount

The operation that you want to perform. Set the value to AddAccount.

AccountName String Yes admin123

The name of the RAM user that you want to create.

Password String Yes 123@abc_1****

The password of the RAM user. The password must meet the following requirements:

  • The password must contain uppercase letters, lowercase letters, and digits.
  • The password must be 8 to 18 characters in length.
RegionId String Yes cn-hangzhou

The region ID.

UseRandomPassword Boolean Yes false

Specifies whether to use a random password.

IsShort Boolean No false

Specifies whether to use an abbreviation.

EnableKMS Boolean No false

Specifies whether to use Key Management Service (KMS) to manage the password.

Remark String No 45566

The remarks on the RAM user.

RamUid String No 153268435710****

The ID of the Alibaba Cloud account to which the RAM user belongs.

Response parameters

Parameter Type Example Description
Account Struct

The RAM user that is created.

Password String 12@ab_789****

The password of the RAM user.

UserName String admin123

The username of the RAM user.

RegionId String cn-hangzhou

The region ID.

RequestId String BE365DEC-A7CF-4E0F-A55E-CDD8BFFF2847

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=AddAccount
&AccountName=admin123
&Password=123@abc_1****
&RegionID=cn-hangzhou
&UseRandomPassword=false
&<Common request parameters>

Sample success responses

XML format

<AddAccountResponse>
  <Account>
        <UserName>admin123</UserName>
        <Password>12@ab_789****</Password>
  </Account>
  <RequestId>BE365DEC-A7CF-4E0F-A55E-CDD8BFFF2847</RequestId>
  <RegionId>cn-hangzhou</RegionId>
</AddAccountResponse>

JSON format

{
    "Account":{"UserName":"admin123","Password":"12@ab_789****"},
    "RequestId":"BE365DEC-A7CF-4E0F-A55E-CDD8BFFF2847",
    "RegionId":"cn-hangzhou"
}

Error codes

For a list of error codes, visit the API Error Center.