All Products
Search
Document Center

Data Management:UpdateInstance

Last Updated:Aug 28, 2026

Updates database instance information and checks instance connectivity.

Operation description

Before calling UpdateInstance, call GetInstance or ListInstances to obtain the complete instance information.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dms:UpdateInstance

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Tid

integer

No

The tenant ID. Call GetUserActiveTenant to query this ID.

3***

InstanceType

string

Yes

The database type. Valid values: DbType parameter.

mysql

InstanceSource

string

Yes

The database instance source. Valid values:

  • PUBLIC_OWN: a self-managed database on the Internet

  • RDS: an ApsaraDB RDS instance

  • ECS_OWN: a self-managed database on an ECS instance

  • VPC_IDC: a self-managed database in a data center connected over VPC

ECS_OWN

EnvType

string

Yes

The environment type of the database instance. 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

Valid values:

  • product :

    product

  • pre :

    pre

  • dev :

    dev

  • test :

    test

product

EcsInstanceId

string

No

The ECS instance ID where the database is deployed.

Note

Required if InstanceSource is ECS_OWN.

i-2zei9gs1t7h8l7ac****

VpcId

string

No

The VPC ID of the database instance.

Note

Required if InstanceSource is VPC_IDC.

vpc-xxx

EcsRegion

string

No

The region ID of the database instance.

Note

Required if InstanceSource is RDS, ECS_OWN, or VPC_IDC.

cn-hangzhou

Host

string

Yes

The host address for connecting to the database instance.

192.XXX.0.56

Port

integer

Yes

The port for connecting to the database instance.

3306

Sid

string

No

The system ID (SID) of the database instance.

Note

Required if InstanceType is ORACLE.

XXX

DatabaseUser

string

Yes

The database logon account.

dbuser

DatabasePassword

string

Yes

The database logon password.

******

InstanceAlias

string

Yes

The database instance alias for identification in DMS.

instance_test

DbaId

string

Yes

The user ID of the DBA for this instance. Call ListUsers or GetInstance to query the user ID.

27****

SafeRuleId

string

Yes

The security rule set name (GroupName) for this instance. Call ListStandardGroups or GetInstance to query the name.

3****

QueryTimeout

integer

Yes

The query timeout period for the database instance.

60

ExportTimeout

integer

Yes

The export timeout period for the database instance.

600

DataLinkName

string

No

The database link name for cross-database queries.

Note
  • Required if UseDsql is 1.

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

  • The name must be unique within a tenant.

datalink_test

DdlOnline

integer

No

Whether to enable lock-free schema change for the database instance. Valid values:

  • 0: Disable lock-free schema change.

  • 1: Use MySQL online DDL first.

  • 2: Use DMS lock-free schema change first.

0

UseDsql

integer

No

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

  • 0: Disable cross-database query.

  • 1: Enable cross-database query.

Note

Supported database types: MySQL, SQL Server, PostgreSQL, PolarDB for PostgreSQL (compatible with Oracle), and ApsaraDB for Redis.

0

InstanceId

string

Yes

The database instance ID. Call GetInstance to query this ID.

126****

SkipTest

boolean

No

Whether to skip the connectivity test. Valid values:

  • true: Skip the connectivity test.

  • false: Do not skip the connectivity test.

false

EnableSellSitd

string

No

  • Y: Enable sensitive data protection.

  • N: Disable sensitive data protection.

  • NULL or other: Do not update the sensitive data protection status.

Y

TemplateId

integer

No

The classification template ID. Call ListClassificationTemplates to query this ID.

3***

TemplateType

string

No

The classification template type. Call ListClassificationTemplates to query this type.

INNER

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

E9BEBF41-4F69-4605-A5D5-A67955173941

ErrorCode

string

The error code. Returned only when the request failed.

UnknownError

ErrorMessage

string

The error message. Returned only when the request failed.

UnknownError

Success

boolean

Whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

false

Examples

Success response

JSON format

{
  "RequestId": "E9BEBF41-4F69-4605-A5D5-A67955173941",
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": false
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.