You can call this operation to query the database account information of a specified ApsaraDB for PolarDB cluster.


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
DBClusterId String Yes pc-xxxxxxxxxxxxxxx The ID of the cluster.
AccessKeyId String No key-test The AccessKey ID provided to you by Alibaba Cloud.
AccountName String No testacc The name of the account.
Action String No DescribeAccounts The operation that you want to perform. Set the value to DescribeAccounts.

Response parameters

Parameter Type Example Description
Accounts Array The list of database accounts.
AccountDescription String AccDesc The description of the database account.
AccountLockState String UnLock The locking status of the account. Valid values:
  • UnLock
  • Lock
AccountName String testacc The name of the database account.
AccountStatus String Available

The status of the account. Valid values:

  • Creating
  • Available
  • Deleting
AccountType String Normal

The type of the database account. Valid values:

  • Normal: standard account
  • Super: privileged account
DatabasePrivileges Array The list of database permissions granted to the account.
Note Only permissions of standard accounts are displayed.
AccountPrivilege String ReadOnly The permissions of the database account on the database.
DBName String DBtest The name of the database.
RequestId String 16B29387-7226-4E6C-98C2-06B98FFD16D8 The ID of the request.


Sample requests

http(s)://[Endpoint]/? Action=DescribeAccounts
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

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