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
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dms:UpdateInstance | update | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Tid | long | No | The ID of the tenant. You can call the GetUserActiveTenant operation to query the tenant ID. | 3*** |
InstanceType | string | Yes | The type of the database. For more information about the valid values of this parameter, see DbType parameter. | mysql |
InstanceSource | string | Yes | The source of the database instance. Valid values:
| ECS_OWN |
EnvType | string | Yes | The type of the environment in which the database instance is deployed. Valid values:
| product |
EcsInstanceId | string | No | 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**** |
VpcId | string | No | 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 |
EcsRegion | string | No | 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 |
Host | string | Yes | The host address that is used to connect to the database instance. | 192.XXX.0.56 |
Port | integer | Yes | The port that is used to connect to the database instance. | 3306 |
Sid | string | No | The system ID (SID) of the database instance. Note
This parameter is required if the InstanceType parameter is set to ORACLE.
| XXX |
DatabaseUser | string | Yes | The account that is used to log on to the database. | dbuser |
DatabasePassword | string | Yes | The password that is used to log on to the database. | ****** |
InstanceAlias | string | Yes | The alias of the database instance. Specify an alias that can help you identify the database instance in DMS. | instance_test |
DbaId | string | Yes | 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**** |
SafeRuleId | string | Yes | 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**** |
QueryTimeout | integer | Yes | The timeout period for querying data in the database instance. | 60 |
ExportTimeout | integer | Yes | The timeout period for exporting data from the database instance. | 600 |
DataLinkName | string | No | The name of the database link for cross-database queries. Note
| datalink_test |
DdlOnline | integer | No | Specifies whether to enable the lock-free schema change feature for the database instance. Valid values:
| 0 |
UseDsql | integer | No | 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 PostgreSQL (compatible with Oracle), and ApsaraDB for Redis.
| 0 |
InstanceId | string | Yes | The ID of the database instance. You can call the GetInstance operation to query the instance ID. | 126**** |
SkipTest | boolean | No | Specifies whether to skip the connectivity test. Valid values:
| false |
EnableSellSitd | string | No |
| Y |
TemplateId | long | No | The ID of the classification template. You can call the ListClassificationTemplates operation to query the template ID. | 3*** |
TemplateType | string | No | The type of the classification template. You can call the ListClassificationTemplates operation to query the template type. | INNER |
Response parameters
Examples
Sample success responses
JSON
format
{
"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 time | Summary of changes | Operation |
---|