Queries the details of search databases.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:SearchDatabase |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Tid |
integer |
No |
The tenant ID. You can call the GetUserActiveTenant operation to obtain the value of this parameter. |
3*** |
| SearchKey |
string |
No |
The keyword used to search for database names. |
testdb |
| PageNumber |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of entries per page. |
10 |
| EnvType |
string |
No |
The environment type of the database. For more information, see Instance environments. |
test |
| SearchRange |
string |
No |
The permission scope. Valid values:
|
HAS_PERMSSION |
| SearchTarget |
string |
No |
The search target. Valid values:
|
SINGLE_DB |
| DbType |
string |
No |
The type of the database. For valid values, see DbType parameter description. |
MYSQL |
| RealLoginUserUid |
string |
No |
The Alibaba Cloud account UID of the user who actually calls the API operation. |
21400447956867**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of entries that meet the specified conditions. |
1 |
| RequestId |
string |
The request ID. |
E0D21075-CD3E-4D98-8264-FD8AD04A63B6 |
| SearchDatabaseList |
object |
||
| SearchDatabase |
array<object> |
The list of search database details. |
|
|
array<object> |
The list of search database details. |
||
| DatabaseId |
string |
The database ID. |
2528**** |
| Host |
string |
The endpoint of the instance where the database resides. |
rm-xxxx.mysql.rds.aliyuncs.com |
| DbaId |
string |
The user ID of the DBA role for the instance. |
10**** |
| SchemaName |
string |
The name of the database. |
test |
| Logic |
boolean |
Indicates whether the database is a logical database. Valid values:
|
false |
| DatalinkName |
string |
The name of the datalink used for cross-database queries. |
datalink_name |
| Port |
integer |
The port of the instance where the database resides. |
3306 |
| EnvType |
string |
The environment type of the database. For more information, see Instance environments. |
test |
| Sid |
string |
The SID of the instance where the database resides. |
testSid |
| OwnerIdList |
object |
||
| OwnerIds |
array |
The user IDs of the database owners. |
|
|
string |
The list of user IDs of the database owners. |
1 |
|
| Encoding |
string |
The encoding format of the database. |
utf8 |
| DbType |
string |
The type of the database. |
mysql |
| OwnerNameList |
object |
||
| OwnerNames |
array |
The nicknames of the database owners. |
|
|
string |
The list of nicknames of the database owners. |
user1 |
|
| SearchName |
string |
The search name of the database. |
test@xxx.xxx.xxx.xxx:3306 |
| Alias |
string |
The alias of the database. |
test_rds |
| CatalogName |
string |
The catalog name of the database. Note
For PostgreSQL databases, the database name is displayed. |
dmstest |
| ErrorCode |
string |
The error code. |
UnknownError |
| ErrorMessage |
string |
The error message. |
UnknownError |
| Success |
boolean |
Indicates whether the request is successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"TotalCount": 1,
"RequestId": "E0D21075-CD3E-4D98-8264-FD8AD04A63B6",
"SearchDatabaseList": {
"SearchDatabase": [
{
"DatabaseId": "2528****",
"Host": "rm-xxxx.mysql.rds.aliyuncs.com",
"DbaId": "10****",
"SchemaName": "test",
"Logic": false,
"DatalinkName": "datalink_name",
"Port": 3306,
"EnvType": "test",
"Sid": "testSid",
"OwnerIdList": {
"OwnerIds": [
"1"
]
},
"Encoding": "utf8",
"DbType": "mysql",
"OwnerNameList": {
"OwnerNames": [
"user1"
]
},
"SearchName": "test@xxx.xxx.xxx.xxx:3306",
"Alias": "test_rds",
"CatalogName": "dmstest"
}
]
},
"ErrorCode": "UnknownError",
"ErrorMessage": "UnknownError",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.