You can call this operation to query detailed information of database instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListInstances

The operation that you want to perform. Set the value to ListInstances.

DbType String Yes mysql

The type of the database instance.

SearchKey String Yes test

The keyword used to query database instances.

Tid Long Yes -1

The ID of the tenant in Data Management (DMS) Enterprise.

EnvType String No product

The type of the environment to which the database instance belongs.

InstanceSource String No RDS

The source of the database instance.

InstanceState String No NORMAL

The status of the database instance. Valid values:

  • NORMAL: The database instance is normal.
  • DISABLE: The database instance is disabled.
NetType String No vpc

The network type of the database instance. Valid values: CLASSIC and VPC. For more information about the valid values, see the description of the RegisterInstance operation.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 50

The number of entries to return on each page. Maximum value: 100.

Response parameters

Parameter Type Example Description
ErrorCode String UnknownError

The error code.

ErrorMessage String UnknownError

The error message.

InstanceList

The detailed information of database instances.

Instance

The detailed information of a database instance.

DataLinkName String dblink_test

The name of the data link for the database instance.

DatabasePassword String ******

The logon password of the database instance.

DatabaseUser String dbUser

The logon username of the database instance.

DbaId String 1

The ID of the database administrator (DBA) of the database instance.

DbaNickName String dbaName

The nickname of the DBA.

DdlOnline Integer 1

Indicates whether the online data description language (DDL) service was enabled for the database instance.

EcsInstanceId String xxx

The ID of the Elastic Compute Service (ECS) instance to which the database instance belongs.

EcsRegion String cn-hangzhou

The region where the database instance resides.

EnvType String product

The type of the environment to which the database instance belongs.

ExportTimeout Integer 600

The timeout period for exporting the database instance.

Host String xxx.xxx.xxx.xxx

The endpoint of the database instance.

InstanceAlias String test

The alias of the database instance.

InstanceId String 1

The ID of the database instance.

InstanceSource String RDS

The source of the database instance.

InstanceType String mysql

The type of the database instance.

Port Integer 3306

The connection port of the database instance.

QueryTimeout Integer 60

The timeout period for querying the database instance.

SafeRuleId String 1

The ID of the security rule for the database instance.

Sid String test

The system ID (SID) of the database instance.

State String NORMAL

The status of the database instance.

UseDsql Integer 1

Indicates whether cross-database query was enabled for the database instance.

VpcId String xxx

The ID of the Virtual Private Cloud (VPC) to which the database instance belongs.

RequestId String B4B07137-F6AE-4756-8474-7F92BB6C4E04

The ID of the request.

Success Boolean true

Indicates whether the request was successful.

TotalCount Long 0

The total number of database instances that met the query conditions.

Examples

Sample requests


http(s)://[Endpoint]/? Action=ListInstances
&<Common request parameters>

Sample success responses

XML format

<TotalCount>7</TotalCount>
<RequestId>98D35416-2B92-4CE5-8FD2-B1E61E165536</RequestId>
<Success>true</Success>
<InstanceList>
</InstanceList>

JSON format

{
	"TotalCount":7,
	"RequestId":"98D35416-2B92-4CE5-8FD2-B1E61E165536",
	"Success":true,
	"InstanceList":{
		"Instance":[]
	}
}

Error codes

For a list of error codes, visit the API Error Center.