Queries information about an instance account.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeInstanceAccounts |
The operation that you want to perform. Set the value to DescribeInstanceAccounts. |
DrdsInstanceId | String | Yes | drds********* |
The ID of the PolarDB-X 1.0 instance. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
InstanceAccounts | Array of InstanceAccount |
Indicates the information about the instance accounts. |
|
InstanceAccount | |||
AccountName | String | test_rds3 |
Indicates the username of an instance account. |
AccountType | Integer | 1 |
Indicates the type of an instance account. Valid values:
|
DbPrivileges | Array of DbPrivilege |
Indicates the information about the permissions of an account on a database. |
|
DbPrivilege | |||
DbName | String | test_rds3 |
Indicates the name of a database. |
Privilege | String | R |
Indicates the permissions that an account is granted on the database. Valid values:
|
Description | String | Created by DRDS |
Indicates the description of an account. By default, if 0 is the value of the AccountType parameter, Created by DRDS is returned as the value of the Description parameter. If 1 is the value of the AccountType parameter, an empty string is returned as the value of the Description parameter. You can modify the description of an account on the Accounts page in the PolarDB-X console. |
Host | String | % |
Indicates an IP address that is allowed to access the database. The value % indicates that each IP address is allowed to access the database. </note> |
RequestId | String | E2E4056D-57EB-4353-8355-2E6284****** |
Indicates the ID of the request. |
Success | Boolean | true |
Indicates whether the request is successful. |
Examples
Sample requests
http(s)://drds.cn-hangzhou.aliyuncs.com?Action=DescribeInstanceAccounts
&DrdsInstanceId=drds*********
&<Common request parameters>
Sample success responses
XML
format
<DescribeInstanceAccountsResponse>
<InstanceAccounts>
<InstanceAccount>
<Description>Created by DRDS</Description>
<DbPrivileges>
<DbPrivilege>
<DbName>drds_flashback</DbName>
<Privilege>ROOT</Privilege>
</DbPrivilege>
</DbPrivileges>
<Host>%</Host>
<AccountName>drds_flashback</AccountName>
<AccountType>0</AccountType>
</InstanceAccount>
</InstanceAccounts>
<RequestId>2D77B55F-50C4-4FC5-A89A-7746B7D5781D</RequestId>
<Success>true</Success>
</DescribeInstanceAccountsResponse>
JSON
format
{
"RequestId": "E2E4056D-57EB-4353-8355-2E6284******",
"InstanceAccounts": {
"InstanceAccount": [
{
"DbPrivileges": {
"DbPrivilege": [
{
"DbName": "test_rds3",
"Privilege": "R"
}
]
},
"Description": "Created by DRDS",
"Host": "%",
"AccountType": 0,
"AccountName": "test_rds3"
},
{
"DbPrivileges": {
"DbPrivilege": [
{
"DbName": "test_rds2",
"Privilege": "R"
}
]
},
"Description": "Created by DRDS",
"Host": "%",
"AccountType": 0,
"AccountName": "test_rds2"
},
{
"DbPrivileges": {
"DbPrivilege": [
{
"DbName": "test_rds1",
"Privilege": "R"
}
]
},
"Description": "Created by DRDS",
"Host": "%",
"AccountType": 0,
"AccountName": "test_rds1"
}
]
},
"Success": true
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | ActionUnauthorized | The specified action is not available for you | The error message returned because you are not granted permissions to perform this operation. Grant the required permissions to the Resource Access Management (RAM) user that you want to use to perform this operation. |
500 | InternalError | The request processing has failed due to some unknown error. | The error message returned because an internal error has occurred. |
For a list of error codes, visit the API Error Center.