All Products
Search
Document Center

Data Management:ModifyInstance

Last Updated:Jan 13, 2026

Modifies the basic and advanced information about a database instance in Data Management (DMS). The basic information includes the hosting mode of the instance, the instance account username and password, and features that are enabled for the instance. The advanced information includes the environment type, the instance name in DMS, and the timeout period for querying and exporting data.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance. You can call the ListInstances or GetInstance operation to query the instance ID.

183****
TidlongNo

The ID of the tenant.

Note You can move the pointer over the profile picture in the upper-right corner of the DMS console to obtain the tenant ID.
23****
InstanceTypestringNo

The type of the database instance. For more information about the valid values of this parameter, see DbType parameter.

MySQL
InstanceSourcestringNo

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 instance 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).
RDS
NetworkTypestringNo

The network type of the database instance. Valid values:

  • CLASSIC: the classic network.
  • VPC: VPC.
VPC
EnvTypestringNo

The type of the environment in which the database instance is deployed. Valid values:

  • product: production environment.
  • dev: development environment.
  • pre: pre-release environment.
  • test: test environment.
  • sit: system integration testing (SIT) environment.
  • uat: user acceptance testing (UAT) environment.
  • pet: stress testing environment.
  • stag: staging environment.
dev
EcsInstanceIdstringNo

The ID of the ECS instance.

Note This parameter is required if InstanceSource is set to ECS_OWN.
i-2zei9gs1t7h8l7ac****
VpcIdstringNo

The VPC ID.

Note This parameter is required if InstanceSource is set to VPC_IDC.
vpc-bp10wnlcmor****
EcsRegionstringNo

The region in which the ECS instance resides.

Note This parameter is required if InstanceSource is set to RDS, ECS_OWN, or VPC_IDC.
cn-hangzhou
HoststringNo

The endpoint that is used to connect to the database instance.

192.XXX.0.56
PortintegerNo

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

3306
SidstringNo

The system ID (SID) of the database instance.

Note This parameter is required if InstanceType is set to ORACLE.
testSid
DatabaseUserstringNo

The account that is used to log on to the database instance.

testsdb
DatabasePasswordstringNo

The password of the account that is used to log on to the database instance.

test***
InstanceAliasstringNo

The alias of the database instance. Specify an alias that can help you quickly identify the database instance in Data Management (DMS).

instance_test
DbaIdlongNo

The ID of the user who assumes the database administrator (DBA) role. You can call the ListUsers or GetInstance operation to obtain the value of this parameter.

27****
QueryTimeoutintegerNo

The timeout period for querying data from the database instance. Unit: seconds.

7200
ExportTimeoutintegerNo

The timeout period for exporting data from the database instance. Unit: seconds.

86400
EnableSellTruststringNo

Specifies whether to enable the security hosting feature for the database instance. Valid values:

  • Y: Enable.
  • N: Disable.
Y
EnableSellStablestringNo

Specifies whether to enable Stable Change for the database instance. Valid values:

  • Y: Enable.
  • N: Disable.
NULL
EnableSellCommonstringNo

Specifies whether to enable Security Collaboration for the database instance. Valid values:

  • Y: Enable.
  • N: Disable.
Y
SafeRulestringNo

The name of the security rule set for the database instance. This parameter is required if Security Collaboration is enabled. You can call the ListStandardGroups or GetInstance operation to obtain the name of the security rule set from GroupName.

EnableSellSitdstringNo

Specifies whether to enable sensitive data protection. Valid values:

  • Y: Enable.
  • N: Disable.
Y
DataLinkNamestringNo

The name of the database link for cross-database queries.

Note
  • This property must be specified when UseDsql is set to 1.

  • The name can contain only lowercase letters and underscores (_).

  • The name must be unique within a tenant.

dblink_test
DdlOnlineintegerNo

Specifies whether to enable lock-free schema change. Valid values:

  • 0: Disable Lock-free Schema Change.
  • 1: MySQL native online DDL first.
  • 2: DMS native online DDL first.
Note Supported databases include ApsaraDB RDS for MySQL, PolarDB for MySQL, ApsaraDB MyBase for MySQL, and third-party MySQL databases.
2
UseDsqlintegerNo

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

  • 0: Disables cross-database query.
  • 1: Enables cross-database query.
Note Supported databases include MySQL, SQL Server, PostgreSQL, PolarDB for Oracle, and Redis.
1
SkipTestbooleanNo

Specifies whether to skip the connectivity test. Valid values:

  • true
  • false
false
TemplateIdlongNo

The ID of the classification and grading template. You can call the ListClassificationTemplates operation to query the template ID.

31***
TemplateTypestringNo

The type of the classification and grading template. You can call the ListClassificationTemplates operation to query the template type.

INNER
UseSslintegerNo

Specifies whether to allow Data Management Service (DMS) to connect to the database instance by using SSL connections. Before you use SSL connections, make sure that the SSL encryption feature is enabled for the database instance. Valid values:

  • 0 (default): DMS automatically checks whether self-negotiation is enabled for the database instance. DMS automatically checks whether the SSL encryption feature is enabled for the database instance. If the SSL encryption feature is enabled, DMS connects to the database instance by using SSL connections. Otherwise, DMS connects to the database instance without encryption.
  • 1: DMS connects to the database instance by using SSL connections. This value is invalid if the SSL encryption feature is disabled for the database instance.
  • -1: DMS does not connect to the database instance by using SSL connections.
Note
  • This parameter is available only for a MySQL or Redis database instance.

  • SSL encrypts network connections at the transport layer to improve the security and integrity of data in transmission. However, SSL increases the response time of network connections.

0

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID. You can use the ID to query logs and troubleshoot issues.

0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931
ErrorCodestring

The error code returned if the request failed.

UnknownError
ErrorMessagestring

The error message that is returned if the request failed.

UnknownError
Successboolean

Indicates whether the request was successful. Valid values:

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

Examples

Sample success responses

JSONformat

{
  "RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-03-20The request parameters of the API has changedView Change Details