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

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 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:

  • PUBLIC_OWN: a self-managed database instance that is deployed on the Internet
  • RDS: an ApsaraDB RDS instance
  • ECS_OWN: a self-managed database that is deployed on an Elastic Compute Service (ECS) instance
  • VPC_IDC: a self-managed database instance that is deployed in a data center connected over a virtual private cloud (VPC)
EnvType String Yes product

The type of the environment to which the database instance belongs. Valid values:

  • product: production environment
  • dev: development environment
  • pre: Staging environment
  • test: test environment
  • sit: system integration testing (SIT) environment
  • uat: user acceptance testing (UAT) environment
  • pet: stress testing environment
  • stag: STAG environment
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
  • This parameter must be specified when the UseDsql parameter is set to 1.
  • The name can only contain lowercase letters and underscores (_).
  • The name must be unique within a tenant.
DdlOnline Integer No 0

Specifies whether to enable the lock-free schema change feature for the database instance. Valid values:

  • 0: disables lock-free schema change.
  • 1: enables MySQL Native OnlineDDL first.
  • 2: enables DMS OnlineDDL first.
UseDsql Integer No 0

Specifies whether to enable the cross-database query feature for the database instance. Valid values:

  • 0: disables cross-database query.
  • 1: enables cross-database query.
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:

  • true: The connectivity test is skipped.
  • false: The connectivity test is not skipped.
EnableSellSitd String No Y
  • Y: enables Sensitive Data Discovery and Protection (SDDP).
  • N: disables SDDP.
  • NULL or other values: The SDDP state is not updated, and remains enabled or disabled.
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:

  • true: The request was successful.
  • false: The request failed.

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.