Updates the information about a database instance and checks whether the instance is connected.
Before you call this operation, call the GetInstance or ListInstances operation to query the complete information about the instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | UpdateInstance |
The operation that you want to perform. Set the value to UpdateInstance. |
| Tid | Long | Yes | 3*** |
The ID of the tenant. You can call the GetUserActiveTenant operation to query the tenant ID. |
| InstanceType | String | Yes | mysql |
The type of the database. For more information about the valid values of this parameter, see DbType parameter. |
| InstanceSource | String | Yes | ECS_OWN |
The source of the database instance. Valid values:
|
| EnvType | String | Yes | product |
The type of the environment to which the database instance belongs. Valid values:
|
| EcsInstanceId | String | No | i-2zei9gs1t7h8l7ac**** |
The ID of the ECS instance. Note This parameter must be specified when the InstanceSource parameter is set to ECS_OWN.
|
| VpcId | String | No | vpc-xxx |
The ID of the VPC. Note This parameter must be specified when the InstanceSource parameter is set to VPC_IDC.
|
| EcsRegion | String | No | cn-hangzhou |
The ID of the region in which the database instance resides. Note This parameter must be specified when the InstanceSource parameter is set to RDS,
ECS_OWN, or VPC_IDC.
|
| Host | String | Yes | 192.XXX.0.56 |
The host address that is used to connect to the database instance. |
| Port | Integer | Yes | 3306 |
The port number that is used to connect to the database instance. |
| Sid | String | No | XXX |
The system ID (SID) of the database instance. Note This parameter must be specified when the InstanceType parameter is set to ORACLE.
|
| DatabaseUser | String | Yes | dbuser |
The account that is used to log on to the database. |
| DatabasePassword | String | Yes | ****** |
The password that is used to log on to the database. |
| InstanceAlias | String | Yes | instance_test |
The alias of the database instance. Specify an alias that can help you identify the database instance in Data Management (DMS). |
| DbaId | String | Yes | 27**** |
The ID of the user who assumes the database administrator (DBA) role of the database instance. You can call the ListUsers or GetInstance operation to query the user ID. |
| SafeRuleId | String | Yes | 3**** |
The ID of the security rule set (GroupName) for the database instance. You can call the ListStandardGroups or GetInstance operation to query the ID of the security rule set that you want to use. |
| QueryTimeout | Integer | Yes | 60 |
The timeout period for querying data in the database instance. |
| ExportTimeout | Integer | Yes | 600 |
The timeout period for exporting data from the database instance. |
| DataLinkName | String | No | datalink_test |
The name of the database link for cross-database query. Note
|
| DdlOnline | Integer | No | 0 |
Specifies whether to enable the lock-free schema change feature for the database instance. Valid values:
|
| UseDsql | Integer | No | 0 |
Specifies whether to enable the cross-database query feature for the database instance. Valid values:
Note Supported database types: MySQL, SQL Server, PostgreSQL, PolarDB for Oracle, and ApsaraDB
for Redis.
|
| InstanceId | String | Yes | 126**** |
The ID of the database instance. You can call the GetInstance operation to query the instance ID. |
| SkipTest | Boolean | No | false |
Specifies whether to skip the connectivity test. Valid values:
|
| EnableSellSitd | String | No | Y |
|
| TemplateId | Long | No | 3*** |
The ID of the updated data classification template. |
| TemplateType | String | No | INNER |
The type of the updated data classification template. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | E9BEBF41-4F69-4605-A5D5-A67955173941 |
The ID of the request. |
| ErrorCode | String | UnknownError |
The error code returned if the request failed. |
| ErrorMessage | String | UnknownError |
The error message returned if the request failed. |
| Success | Boolean | false |
Indicates whether the request was successful. Valid values:
|
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=UpdateInstance
&<Common request parameters>Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<RequestId>E9BEBF41-4F69-4605-A5D5-A67955173941</RequestId>
<Success>true</Success>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "E9BEBF41-4F69-4605-A5D5-A67955173941",
"Success" : true
}Error codes
For a list of error codes, see Service error codes.