Retrieves 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 operation to obtain this parameter. |
3*** |
| SearchKey |
string |
No |
The search keyword. |
test |
| DbType |
string |
No |
The database type. For more information about 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 of the instance. 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 value cannot exceed 100. |
50 |
| Region |
string |
No |
The region ID of the instance. |
cn-hangzhou |
| RealLoginUserUid |
string |
No |
The Alibaba Cloud account ID of the user who actually calls the API. |
21400447956867**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| TotalCount |
integer |
The total number of instances that meet the conditions. |
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 |
||
| Instance |
array<object> |
The instance list. |
|
|
array<object> |
The instance information. |
||
| VpcId |
string |
The ID of the VPC to which the instance belongs. |
vpc-o6wrloqsdqc9io3mg**** |
| DatabaseUser |
string |
The database username. |
dbUser |
| DbaId |
string |
The DBA ID of the instance. |
31**** |
| UseDsql |
integer |
Indicates whether cross-database query is enabled for the instance.
|
1 |
| Port |
integer |
The connection port of the instance. |
3306 |
| EcsInstanceId |
string |
The ECS instance ID. |
150**** |
| EnvType |
string |
The environment type of the instance. Valid values:
|
product |
| Sid |
string |
The SID of the instance. |
test |
| OwnerIdList |
object |
||
| OwnerIds |
array |
The list of owner user IDs of the instance. |
|
|
string |
The owner user ID of the instance. |
12**** |
|
| SafeRuleId |
string |
The security rule ID of the instance. |
1 |
| OwnerNameList |
object |
||
| OwnerNames |
array |
The list of owner nicknames of the instance. |
|
|
string |
The owner nickname of the instance. |
yuyang_test |
|
| DbaNickName |
string |
The DBA nickname of the instance. |
dbaName |
| QueryTimeout |
integer |
The query timeout period of the instance. |
60 |
| InstanceSource |
string |
The instance source. |
RDS |
| Host |
string |
The endpoint of the instance. |
****.mysql.rds.aliyuncs.com |
| State |
string |
The instance status. |
NORMAL |
| DataLinkName |
string |
The DataLink name. |
dblink_test |
| ExportTimeout |
integer |
The export timeout period. |
86400 |
| InstanceId |
string |
The instance ID. |
150*** |
| InstanceType |
string |
The database type of the instance. |
mysql |
| DatabasePassword |
string |
The database user password. |
****** |
| InstanceAlias |
string |
The alias of the instance. |
test |
| DdlOnline |
integer |
The DdlOnline configuration of the instance. |
1 |
| EcsRegion |
string |
The region to which the instance belongs. |
cn-hangzhou |
| StandardGroup |
object |
The control mode information of the instance. |
|
| GroupName |
string |
The name of the security rule that corresponds to the control mode. |
test |
| GroupMode |
string |
The control mode type. Valid values:
|
COMMON |
| SellSitd |
boolean |
Indicates whether sensitive data protection is enabled. Valid values:
|
true |
| SellTrust |
string |
Indicates whether security hosting is enabled. Valid values:
|
true |
| UseSsl |
integer |
0 |
|
| Success |
boolean |
Indicates whether the request is 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": "true",
"UseSsl": 0
}
]
},
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.