Updates the information and checks the connectivity of a specified database instance.

Before calling this operation to update a database instance, call the GetInstance operation to query the complete information of the database instance, and set the instance parameters as required.

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 UpdateInstance

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

DatabasePassword String Yes ******

The password for the database account.

DatabaseUser String Yes dbuser

The database account.

DbaId String Yes 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.

EnvType String Yes test

The environment to which the instance belongs.

ExportTimeout Integer Yes 600

The timeout period for exporting the instance.

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

The connection address of the instance.

InstanceAlias String Yes test

The alias of the instance.

InstanceId String Yes 1

The ID of the instance. The value is the same as the value returned by the GetInstance operation.

InstanceSource String Yes RDS

The source of the instance. For more information about the valid values, see the description of the RegisterInstance API.

InstanceType String Yes MySQL

The type of the database instance. For more information about the valid values, see the description of the RegisterInstance API.

Port Integer Yes 3306

The instance Port.

QueryTimeout Integer Yes 60

The timeout period for querying the instance.

SafeRuleId String Yes 1

The ID of the security rule to which the instance belongs.

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 .
EcsInstanceId String No xxx

The ID of the EcsInstanceId to which the instance belongs. For more information, see RegisterInstance API.

VpcId String No xxx

The ID of the VPC to which the instance belongs.

EcsRegion String No cn-hangzhou

The ID of the Region to which the instance belongs.

Sid String No xxx

The system ID (sid) of the instance.

DataLinkName String No datalink_test

The dataLinkName of the instance.

DdlOnline Integer No 1

Set instance onlineddl. For more information about the values, see the RegisterInstance API.

UseDsql Integer No 1

Specifies whether to enable cross-database query for the database instance.

Response parameters

Parameter Type Sample response Description
ErrorCode String UnknownError

The error codes.

ErrorMessage String UnknownError

The error message of the failure.

RequestId String E9BEBF41-4F69-4605-A5D5-A67955173941

The ID of the API request.

Success Boolean false

Indicates whether the instance is updated.

Examples

Sample request


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

Sample success responses

XML format


     <RequestId>E9BEBF41-4F69-4605-A5D5-A67955173941</RequestId> <Success>true</Success> 
   

JSON


     { "RequestId": "E9BEBF41-4F69-4605-A5D5-A67955173941", "Success": true } 
   

Error codes

For more information about error codes, see error center.