Queries information about all accounts or specified accounts in a PolarDB-X instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeAccountList |
The operation that you want to perform. Set the value to DescribeAccountList. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where the PolarDB-X instance is deployed. |
DBInstanceName | String | Yes | pxc-******** |
The name of the PolarDB-X instance. |
AccountName | String | No | testaccount |
The username of the account that you want to query. If you want to query information about a specific account, you must specify this parameter. |
AccountType | String | No | 0 |
The type of accounts that you want to query. If you want to query a specific type of accounts, you must specify this parameter. If you do not specify this parameter, information about all accounts of the specified instance is returned.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Message | String | success |
The message that is returned. If the request is successful, "success" is returned. If the request fails, an error code is returned. |
RequestId | String | 9B2F3840-5C98-475C-B269-2D5C3A31797C |
The ID of the request. |
Success | Boolean | true |
Indicates whether the request is successful. |
Data | Array of Account |
The data that is returned. |
|
GmtCreated | String | 2012-06-08T15:00Z |
The point in time when the account was created. |
DBInstanceName | String | pxc-********* |
The name of the PolarDB-X instance. |
AccountDescription | String | testaccount desc |
The description of the account. |
DBName | String | testdb |
The PolarDB-X database that can be accessed by using the account. |
AccountPrivilege | String | ReadWrite |
The type of permissions that are granted to the account. |
AccountType | String | 0 |
The type of the account.
|
AccountName | String | testAccount |
The username of the account. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeAccountList
&RegionId=cn-hangzhou
&DBInstanceName=pxc-********
&AccountName=testaccount
&AccountType=0
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeAccountListResponse>
<Message>success</Message>
<RequestId>9B2F3840-5C98-475C-B269-2D5C3A31797C</RequestId>
<Success>true</Success>
<Data>
<GmtCreated>2012-06-08T15:00Z</GmtCreated>
<DBInstanceName>pxc-*********</DBInstanceName>
<AccountDescription>testaccount desc</AccountDescription>
<DBName>testdb</DBName>
<AccountPrivilege>ReadWrite</AccountPrivilege>
<AccountType>0</AccountType>
<AccountName>testAccount</AccountName>
</Data>
</DescribeAccountListResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Message" : "success",
"RequestId" : "9B2F3840-5C98-475C-B269-2D5C3A31797C",
"Success" : true,
"Data" : [ {
"GmtCreated" : "2012-06-08T15:00Z",
"DBInstanceName" : "pxc-*********",
"AccountDescription" : "testaccount desc",
"DBName" : "testdb",
"AccountPrivilege" : "ReadWrite",
"AccountType" : "0",
"AccountName" : "testAccount"
} ]
}
Error codes
For a list of error codes, visit the API Error Center.