All Products
Search
Document Center

Data Management:UpdateInstance

Last Updated:Oct 21, 2024

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

Operation description

Before you call the UpdateInstance operation, call the GetInstance or ListInstances operation to obtain the complete information about the instance.

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
TidlongNo

The ID of the tenant. You can call the GetUserActiveTenant operation to query the tenant ID.

3***
InstanceTypestringYes

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

mysql
InstanceSourcestringYes

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)
ECS_OWN
EnvTypestringYes

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
product
EcsInstanceIdstringNo

The ID of the ECS instance on which the database instance is deployed.

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

The ID of the VPC to which the database instance belongs.

Note This parameter is required if the InstanceSource parameter is set to VPC_IDC.
vpc-xxx
EcsRegionstringNo

The ID of the region in which the database instance resides.

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

The host address that is used to connect to the database instance.

192.XXX.0.56
PortintegerYes

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 the InstanceType parameter is set to ORACLE.
XXX
DatabaseUserstringYes

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

dbuser
DatabasePasswordstringYes

The password that is used to log on to the database.

******
InstanceAliasstringYes

The alias of the database instance. Specify an alias that can help you identify the database instance in DMS.

instance_test
DbaIdstringYes

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.

27****
SafeRuleIdstringYes

The name of the security rule set (GroupName) for the instance. You can call the ListStandardGroups or GetInstance operation to query the name of the security rule set.

3****
QueryTimeoutintegerYes

The timeout period for querying data in the database instance.

60
ExportTimeoutintegerYes

The timeout period for exporting data from the database instance.

600
DataLinkNamestringNo

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

Note
  • This parameter is required if UseDsql is set to 1.

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

  • The name must be unique within a tenant.

datalink_test
DdlOnlineintegerNo

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

  • 0: disables the lock-free schema change feature.
  • 1: uses the online DDL of MySQL first.
  • 2: uses the lock-free schema change feature of DMS first.
0
UseDsqlintegerNo

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

  • 0: disables the cross-database query feature.
  • 1: enables the cross-database query feature.
Note Supported database types: MySQL, SQL Server, PostgreSQL, PolarDB for PostgreSQL (compatible with Oracle), and ApsaraDB for Redis.
0
InstanceIdstringYes

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

126****
SkipTestbooleanNo

Specifies whether to skip the connectivity test. Valid values:

  • true: skips the connectivity test
  • false: does not skip the connectivity test
false
EnableSellSitdstringNo
  • Y: enables the sensitive data protection feature
  • N: disables the sensitive data protection feature
  • NULL or other: does not update the status of the sensitive data protection feature
Y
TemplateIdlongNo

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

3***
TemplateTypestringNo

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

INNER

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

E9BEBF41-4F69-4605-A5D5-A67955173941
ErrorCodestring

The error code returned if the request failed.

UnknownError
ErrorMessagestring

The error message returned if the request failed.

UnknownError
Successboolean

Indicates whether the request was successful. Valid values:

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

Examples

Sample success responses

JSONformat

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

Error codes

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

Change history

Change timeSummary of changesOperation
No change history