Queries the details of a database account of a PolarDB cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | DescribeAccounts |
The operation that you want to perform. Set the value to DescribeAccounts. |
DBClusterId | String | Yes | pc-*************** |
The ID of the cluster. |
AccountName | String | No | test_acc |
The name of the account. |
PageNumber | Integer | No | 1 |
The number of the page to return. The value must be an integer that is larger than 0. Default value: 1. |
PageSize | Integer | No | 30 |
The number of entries to return on each page. Valid values:
Default value: 30. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Accounts | Array of DBAccount |
The details of the account. |
|
AccountDescription | String | test |
The description of the account. |
AccountLockState | String | UnLock |
The locking status of the account. Valid values:
|
AccountName | String | test_acc |
The name of the account. |
AccountPasswordValidTime | String | undefined |
The validity period of the password. |
AccountStatus | String | Available |
The status of the account. Valid values:
|
AccountType | String | Normal |
The type of the database account. Valid values:
|
DatabasePrivileges | Array of DatabasePrivilege |
The list of database permissions that are granted to the account. Note This parameter is only returned for standard accounts.
|
|
AccountPrivilege | String | ReadOnly |
The permissions of the database account. |
DBName | String | DBtest |
The name of the database. |
PageNumber | Integer | 1 |
The page number of the returned page. |
PageRecordCount | Integer | 1 |
The number of entries returned on the current page. |
RequestId | String | 155462B9-205F-4FFC-BB43-4855FE****** |
The ID of the request. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/? Action=DescribeAccounts
&DBClusterId=pc-***************
&<Common request parameters>
Sample success responses
XML
format
<DescribeAccountsResponse>
<PageRecordCount>1</PageRecordCount>
<RequestId>155462B9-205F-4FFC-BB43-4855FE******</RequestId>
<PageNumber>1</PageNumber>
<Accounts>
<AccountDescription>test</AccountDescription>
<AccountStatus>Available</AccountStatus>
<AccountLockState>UnLock</AccountLockState>
<AccountPasswordValidTime>undefined</AccountPasswordValidTime>
<AccountType>Normal</AccountType>
<AccountName>test_acc</AccountName>
</Accounts>
<Accounts>
<DatabasePrivileges>
<AccountPrivilege>ReadOnly</AccountPrivilege>
<DBName>DBtest</DBName>
</DatabasePrivileges>
</Accounts>
</DescribeAccountsResponse>
JSON
format
{
"PageRecordCount": 1,
"RequestId": "155462B9-205F-4FFC-BB43-4855FE******",
"PageNumber": 1,
"Accounts": [
{
"AccountDescription": "test",
"AccountStatus": "Available",
"AccountLockState": "UnLock",
"AccountPasswordValidTime": "undefined",
"AccountType": "Normal",
"AccountName": "test_acc"
},
{
"DatabasePrivileges": {
"AccountPrivilege": "ReadOnly",
"DBName": "DBtest"
}
}
]
}
Error codes
For a list of error codes, visit the API Error Center.