Call ListInstances to retrieve a list of instances.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:ListInstances |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Tid |
integer |
No |
The tenant ID. You can call the GetUserActiveTenant API to obtain this ID. |
3*** |
| SearchKey |
string |
No |
The keyword to search for instances. |
test |
| DbType |
string |
No |
The database type. For valid values, see DbType parameter description. |
MySQL |
| EnvType |
string |
No |
The environment type. Valid values:
|
product |
| InstanceSource |
string |
No |
The instance source. Valid values:
|
RDS |
| NetType |
string |
No |
The network type. Valid values:
|
VPC |
| InstanceState |
string |
No |
The instance status. Valid values:
|
NORMAL |
| PageNumber |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of entries per page. The maximum value is 100. |
50 |
| Region |
string |
No |
||
| RealLoginUserUid |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| TotalCount |
integer |
The total number of instances that meet the specified criteria. |
1 |
| RequestId |
string |
The request ID. |
B4B07137-F6AE-4756-8474-7F92BB6C4E04 |
| ErrorCode |
string |
The error code. |
UnknownError |
| ErrorMessage |
string |
The error message. |
UnknownError |
| InstanceList |
object |
The instances. |
|
| Instance |
array<object> |
The details of the instances. |
|
|
array<object> |
The details of the instance. |
||
| VpcId |
string |
The ID of the virtual private cloud (VPC) to which the instance belongs. |
vpc-o6wrloqsdqc9io3mg**** |
| DatabaseUser |
string |
The username of the database account. |
dbUser |
| DbaId |
string |
The ID of the database administrator (DBA) of the instance. |
31**** |
| UseDsql |
integer |
Indicates whether cross-database query is enabled for the instance. Valid values:
|
1 |
| Port |
integer |
The port used to connect to the instance. |
3306 |
| EcsInstanceId |
string |
The ID of the Elastic Compute Service (ECS) instance. |
150**** |
| EnvType |
string |
The type of the environment to which the instance belongs. Valid values:
|
product |
| Sid |
string |
The system ID (SID) of the instance. |
test |
| OwnerIdList |
object |
The IDs of the owners of the instance. |
|
| OwnerIds |
array |
The user IDs of the owners of the instance. |
|
|
string |
The ID of the owner. |
12**** |
|
| SafeRuleId |
string |
The ID of the security rule for the instance. |
1 |
| OwnerNameList |
object |
The nicknames of the owners of the instance. |
|
| OwnerNames |
array |
The nicknames of the owners. |
|
|
string |
The nickname of the owner. |
yuyang_test |
|
| DbaNickName |
string |
The nickname of the DBA. |
dbaName |
| QueryTimeout |
integer |
The timeout period for queries. Unit: seconds. |
60 |
| InstanceSource |
string |
The source of the instance. |
RDS |
| Host |
string |
The endpoint of the instance. |
****.mysql.rds.aliyuncs.com |
| State |
string |
The status of the instance. |
NORMAL |
| DataLinkName |
string |
The name of the database link. |
dblink_test |
| ExportTimeout |
integer |
The timeout period for exporting data. Unit: seconds. |
86400 |
| InstanceId |
string |
The ID of the instance. |
150*** |
| InstanceType |
string |
The type of the database. |
mysql |
| DatabasePassword |
string |
The password that corresponds to the username of the database account. |
****** |
| InstanceAlias |
string |
The alias of the instance. |
test |
| DdlOnline |
integer |
The lock-free schema change settings of the instance. |
1 |
| EcsRegion |
string |
The region in which the instance resides. |
cn-hangzhou |
| StandardGroup |
object |
The control mode of the instance. |
|
| GroupName |
string |
The name of the security rule that corresponds to the control mode. |
test |
| GroupMode |
string |
The control mode. Valid values:
|
COMMON |
| SellSitd |
boolean |
Indicates whether sensitive data protection is enabled. Valid values:
|
true |
| SellTrust |
string |
||
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"TotalCount": 1,
"RequestId": "B4B07137-F6AE-4756-8474-7F92BB6C4E04",
"ErrorCode": "UnknownError",
"ErrorMessage": "UnknownError",
"InstanceList": {
"Instance": [
{
"VpcId": "vpc-o6wrloqsdqc9io3mg****",
"DatabaseUser": "dbUser",
"DbaId": "31****",
"UseDsql": 1,
"Port": 3306,
"EcsInstanceId": "150****",
"EnvType": "product",
"Sid": "test",
"OwnerIdList": {
"OwnerIds": [
"12****"
]
},
"SafeRuleId": "1",
"OwnerNameList": {
"OwnerNames": [
"yuyang_test"
]
},
"DbaNickName": "dbaName",
"QueryTimeout": 60,
"InstanceSource": "RDS",
"Host": "****.mysql.rds.aliyuncs.com",
"State": "NORMAL",
"DataLinkName": "dblink_test",
"ExportTimeout": 86400,
"InstanceId": "150***",
"InstanceType": "mysql",
"DatabasePassword": "******",
"InstanceAlias": "test",
"DdlOnline": 1,
"EcsRegion": "cn-hangzhou",
"StandardGroup": {
"GroupName": "test",
"GroupMode": "COMMON"
},
"SellSitd": true,
"SellTrust": ""
}
]
},
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.