Call the ListInstances API to retrieve 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 ID of the tenant. You can call the GetUserActiveTenant operation to obtain this ID. |
3*** |
| SearchKey |
string |
No |
The search keyword. |
test |
| DbType |
string |
No |
The database type. For more information about valid values, see DbType parameter. |
MySQL |
| EnvType |
string |
No |
The environment type of the instance. Valid values:
|
product |
| InstanceSource |
string |
No |
The source of the instance. Valid values:
|
RDS |
| NetType |
string |
No |
The network type of the instance. Valid values:
|
VPC |
| InstanceState |
string |
No |
The state of the instance. Valid values:
|
NORMAL |
| PageNumber |
integer |
No |
The number of the page to return. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page. Maximum value: 100. |
50 |
| Region |
string |
No |
The ID of the region in which the instance resides. |
cn-hangzhou |
| RealLoginUserUid |
string |
No |
实际调用 API 的用户的阿里云账号 UID |
21400447956867**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned. |
||
| TotalCount |
integer |
The total number of entries that match the query. |
1 |
| RequestId |
string |
The ID of the request. |
B4B07137-F6AE-4756-8474-7F92BB6C4E04 |
| ErrorCode |
string |
The error code. |
UnknownError |
| ErrorMessage |
string |
The error message. |
UnknownError |
| InstanceList |
object |
The list of instances. |
|
| Instance |
array<object> |
The instances. |
|
|
array<object> |
The information about 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 connection port of the instance. |
3306 |
| EcsInstanceId |
string |
The ID of the Elastic Compute Service (ECS) instance. |
150**** |
| EnvType |
string |
The environment type of the instance. Valid values:
|
product |
| Sid |
string |
The system ID (SID) of the instance. |
test |
| OwnerIdList |
object |
The IDs of the instance owners. |
|
| OwnerIds |
array |
The user IDs of the instance owners. |
|
|
string |
The user ID of an instance owner. |
12**** |
|
| SafeRuleId |
string |
The ID of the security rule for the instance. |
1 |
| OwnerNameList |
object |
The nicknames of the instance owners. |
|
| OwnerNames |
array |
The nicknames of the instance owners. |
|
|
string |
The nickname of an instance owner. |
yuyang_test |
|
| DbaNickName |
string |
The nickname of the DBA. |
dbaName |
| QueryTimeout |
integer |
The timeout period for a query. 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 an export. Unit: seconds. |
86400 |
| InstanceId |
string |
The ID of the instance. |
150*** |
| InstanceType |
string |
The database type of the instance. |
mysql |
| DatabasePassword |
string |
The password of the database account. |
****** |
| InstanceAlias |
string |
The alias of the instance. |
test |
| DdlOnline |
integer |
The Data Definition Language (DDL) online configuration. |
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 for the control mode. |
test |
| GroupMode |
string |
The control mode of the instance. Valid values:
|
COMMON |
| SellSitd |
boolean |
Indicates whether sensitive data protection is enabled. Valid values:
|
true |
| SellTrust |
string |
Indicates whether managed security is enabled. Valid values:
|
true |
| 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": "true"
}
]
},
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.