You can call this API to query all accounts or a specified account of an ApsaraDB for Redis instance.

Note The engine version of the ApsaraDB for Redis instance must be Redis 4.0 or above.


Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeAccounts

The operation that you want to perform. Set this parameter to DescribeAccounts.

InstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance to which the account belongs.

AccessKeyId String No Lxxxxxxxxxxxxxxw

The AccessKey ID that Alibaba Cloud provides for you to access services.

AccountName String No demoaccount

The name of the account. The name must start with a lowercase letter and can contain lowercase letters, digits, and underscores (_). The name can be 1 to 16 characters in length.

Response parameters

Parameter Type Example Description

The accounts that were queried.

└AccountDescription String this is a test account

The description of the account.

└AccountName String demoaccount

The name of the account.

└AccountStatus String Available

The status of the account. Valid values:

  • Unavailable
  • Available
└AccountType String Normal

The type of the account. Valid values:

  • Normal
  • Super

The permissions of the account.

└AccountPrivilege String RoleReadWrite

The permission of the account. Valid values:

  • RoleReadOnly
  • RoleReadWrite (default value)
  • RoleRepl
Note In addition to reading data from and writing data to the ApsaraDB for Redis instance, an account with the RoleRepl permission can run the SYNC and PSYNC commands.
└InstanceId String r-bp1xxxxxxxxxxxxx

The ID of the instance.

RequestId String 6C9E114C-217C-4118-83C0-B40702221161

The ID of the request.


Sample request
? Action=DescribeAccounts
&<Common request parameters>

Sample success response

XML format


JSON format


Error codes

View error codes.