Creates an account that has the specified permissions for an ApsaraDB for Redis instance.

  • Only ApsaraDB for Redis instances of Redis 4.0 or later are supported.
  • The ApsaraDB for Redis instance must be in the running state.
  • You can create up to 18 accounts for an ApsaraDB for Redis instance.

For more information about how to perform the corresponding operations in the console, see Manage database accounts.


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 CreateAccount

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

AccountName String Yes demoaccount

The name of the account. The name must meet the following requirements:

  • The name can contain lowercase letters, digits, and hyphens (-), and must start with a lowercase letter.
  • The name can be up to 100 characters in length.
  • The name cannot be one of the reserved words in the Reserved words for Redis account names section.
AccountPassword String Yes uWonno21****

The password of the account. The password must be 8 to 32 characters in length. It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include !@ # $ % ^ & * ( ) _ + - =

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

AccountPrivilege String No RoleReadOnly

The permissions of the account. Default value: RoleReadWrite. Valid values:

  • RoleReadOnly: The account has the read-only permissions.
  • RoleReadWrite: The account has the read and write permissions.
AccountDescription String No testaccount

The description of the account.

  • The description must start with a letter and cannot start with http: // or https: //.
  • The description can contain letters, digits, underscores (_), and hyphens (-).
  • The description must be 2 to 256 characters in length.
AccountType String No Normal

The type of the account. Set the value to Normal.

RegionId String No cn-hangzhou

The region ID of the instance.

Response parameters

Parameter Type Example Description
AcountName String demoaccount

The name of the account.

InstanceId String r-bp1zxszhcgatnx****

The ID of the instance.

RequestId String ABAF95F6-35C1-4177-AF3A-70969EBD****

The ID of the request.


Sample requests
&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "D3876765-1983-4CBC-BB45-79EEBD6D****",
    "InstanceId": "r-bp1zxszhcgatnx****",
    "AcountName": "demoaccount"

Error codes

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