Queries the details 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. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

Request parameters

Parameter Type Required Example Description
Action String Yes GetInstance

The operation that you want to perform. Value: GetInstance .

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

The connection address of the instance.

Port Integer Yes 3306

The port number that is used to connect to the instance.

Tid Long Yes -1

The ID of the tenant.

Note The tenant ID is taken from the tenant ID displayed when you move the pointer on your profile picture. For more information, see View tenant information .
Sid String No test

The system ID (Sid) of the instance.

Response parameters

Parameter Type Sample response Description
ErrorCode String UnknownError

The error codes.

ErrorMessage String UnknownError

The error message of the failure.

Instance Struct

The information about a tag attached to the 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 instance ID.

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 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 VPC to which the instance belongs.

RequestId String 8BE73E78-76E2-46AA-970D-A4579A16CD4A

The ID of the API request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample request


     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> 1037 </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> 24710 </InstanceId> <DataLinkName> dblink_test </DataLinkName> <EnvType> dev </EnvType> <DdlOnline> 0 </DdlOnline> <VpcId> vpc-xxx </VpcId> <InstanceType> polardb with Oracle </InstanceType> <DbaId> 104442 </DbaId> <Port> 3306 </Port> <DbaNickName> test [account] </DbaNickName> <State> NORMAL </State> <DatabaseUser> dmstest </DatabaseUser> <DatabasePassword> ****** </DatabasePassword> <EcsRegion> cn-hangzhou </EcsRegion> <ExportTimeout> 300 </ExportTimeout> </Instance> <RequestId> 8BE73E78-76E2-46AA-970D-A4579A16CD4A </RequestId> <Success> true </Success> 
   

JSON


     {"Instance": { "SafeRuleId": 1037, "UseDsql": "1", "EcsInstanceId": "pc-xxx", "QueryTimeout": 80, "Host": "xxx.rwlb.rds.aliyuncs.com", "InstanceAlias": "test", "InstanceSource": "RDS", "InstanceId": 24710, "DataLinkName": "dblink_test", "EnvType":" dev ", " DdlOnline ": 0, " VpcId ": " vpc-xxx ", " InstanceType ": " polardb ", " DbaId ": 104442," Port ": 3306, " dbanicname ": " test [Ram user] ", " State ": " NORMAL ", " databeasuser ": " "dmstest", "DatabasePassword": "dmstest instance ***", "EcsRegion": "cn-hangzhou", " ExportTimeout": 300 }, "RequestId": "8BE73E78-76E2-46AA-970D-A4579A16CD4A", "Success": true} 
   

Error codes

For more information about error codes, see error center.