You can call this operation to query detailed information of a specified database instance.

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 GetInstance

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

Host String Yes xxxx.mysql.rds.aliyuncs.com

The endpoint of the database instance.

Port Integer Yes 3306

The connection port of the database instance.

Tid Long Yes -1

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

Sid String No test

The system ID (SID) of the database instance.

Response parameters

Parameter Type Example Description
ErrorCode String UnknownError

The error code.

ErrorMessage String UnknownError

The error message.

Instance

The detailed information of the database instance.

DataLinkName String 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. The value is the same as the ID of the DBA returned by the ListUsers operation.

DbaNickName String dbaname

The nickname of the DBA of the database instance.

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 test

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.rwlb.rds.aliyuncs.com

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 polardb

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 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 8BE73E78-76E2-46AA-970D-A4579A******

The ID of the request.

Success Boolean true

Indicates whether the request was successful.

Examples

Sample requests


http(s)://[Endpoint]/? Action=GetInstance
&Host=xxxx.mysql.rds.aliyuncs.com
&Port=3306
&Tid=-1
&<Common request parameters>

Sample success responses

XML format

<Instance>
    <SafeRuleId>1**7</SafeRuleId>
    <UseDsql>1</UseDsql>
    <EcsInstanceId>pc-xxx</EcsInstanceId>
    <QueryTimeout>80</QueryTimeout>
    <Host>xxx.rwlb.rds.aliyuncs.com</Host>
    <InstanceAlias>test</InstanceAlias>
    <InstanceSource>RDS</InstanceSource>
    <InstanceId>24***</InstanceId>
    <DataLinkName>xxxxxx_test</DataLinkName>
    <EnvType>dev</EnvType>
    <DdlOnline>0</DdlOnline>
    <VpcId>vpc-xxx</VpcId>
    <InstanceType>polardb</InstanceType>
    <DbaId>104***</DbaId>
    <Port>3306</Port>
    <DbaNickName>test[RAM user]</DbaNickName>
    <State>NORMAL</State>
    <DatabaseUser>xxxtest</DatabaseUser>
    <DatabasePassword>******</DatabasePassword>
    <EcsRegion>cn-hangzhou</EcsRegion>
    <ExportTimeout>300</ExportTimeout>
</Instance>
<RequestId>8BE73E78-76E2-46AA-970D-A4579A******</RequestId>
<Success>true</Success>

JSON format

{
	"Instance":{
		"SafeRuleId":1**7,
		"UseDsql":"1",
		"EcsInstanceId":"pc-xxx",
		"QueryTimeout":80,
		"Host":"xxx.rwlb.rds.aliyuncs.com",
		"InstanceAlias":"test",
		"InstanceSource":"RDS",
		"InstanceId":24***,
		"DataLinkName":"xxxxxx_test",
		"EnvType":"dev",
		"DdlOnline":0,
		"VpcId":"vpc-xxx",
		"InstanceType":"polardb",
		"DbaId":104***,
		"Port":3306,
		"DbaNickName":"test[RAM user]",
		"DatabaseUser":"xxxtest",
		"State":"NORMAL",
		"DatabasePassword":"******",
		"EcsRegion":"cn-hangzhou",
		"ExportTimeout":300
	},
	"RequestId":"8BE73E78-76E2-46AA-970D-A4579A******",
	"Success":true
}

Error codes

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