You can call the UpgradeDBInstanceEngineVersion operation to upgrade the major engine version of an ApsaraDB RDS for MySQL instance.
Operation Description
If the instance is a primary instance to which read-only instances or disaster recovery instances are attached, you must upgrade the major engine versions of the read-only instances or disaster recovery instances before you upgrade the major engine version of the primary instance.
Before you call this operation, make sure that the following requirements are met:
The original instance is in the Running state.
The instance runs one of the following database versions:
- MySQL 5.7
- MySQL 5.6
- MySQL 5.5
You can call the UpgradeDBInstanceMajorVersion operation to upgrade the major engine version of an ApsaraDB RDS for PostgreSQL instance.
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 | Association operation |
---|---|---|---|---|
rds:UpgradeDBInstanceEngineVersion | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the generated token is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. | ETnLKlblzczshOTUbOCzxxxxxxxxxx |
DBInstanceId | string | Yes | The ID of the instance. | rm-uf6wjk5xxxxxxx |
EngineVersion | string | Yes | The major engine version that the new instance runs. Valid values:
| 5.7 |
EffectiveTime | string | No | The time when you want the change to take effect. Valid values:
Default value: Immediate. | Immediate |
Response parameters
Examples
Sample success responses
JSON
format
{
"TaskId": "10254125",
"RequestId": "65BDA532-28AF-4122-AA39-B382721EEE64"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidOrderTask.NotSupport | The Current InstanceId exist Order Task in RDS. | Uncompleted order tasks are found in the RDS instance. Please try again later. |
400 | InvalidEVENT | Current DB instance has event schedule, this operation is not supported. | - |
400 | InvalidSSLstatus | Current DB instance has SSL enabled, this operation is not supported. | This operation is not supported because this instance has SSL enabled. |
400 | InvalidTDEstatus | Current DB instance has TDE enabled, this operation is not supported. | This operation is not supported because TDE is enabled on the instance. |
400 | InvalidDBInstanceConnType.Format | Specified DB instance conn type is not valid. | The operation failed. The operation is not supported for the connection type of the RDS instance. |
400 | UnsupportedReadOrBakReadState | Current DB instance has read or bak read instance running in unsupported states. | - |
403 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | - |
403 | IncorrectEngineVersion | The engine version does not support the operation. | The operation failed. The operation is not supported for the database engine version of the RDS instance. |
403 | IncorrectEngineTypeMyisam | Current DB instance has MyISAM table, and it does not support this operation. | The major version of MySQL is upgraded. Check whether the instance has MyISAM engine tables. |
403 | InvalidAccountName.Format | Current DB instance has account aliyun_root,and it does not support this operation. | - |
403 | InvalidInstanceLevel.Malformed | Current DB instance level does not support this operation. | The specified database instance type does not support this operation. |
403 | IncorrectDBInstanceLockMode | Current DB instance lock mode does not support this operation. | The operation failed. The RDS instance is locked. |
403 | UnsupportedReadOrBakReadState | Current DB instance has read or bak read running in unsupport states | The current instance is in the unsupported read or bak read state. |
404 | InvalidDBInstance.NotFound | The specified instance does not exist or is not supported. | The RDS instance cannot be found. Check the ID or name of the RDS instance. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2022-07-19 | The error codes of the API operation change. | |||||||||
| ||||||||||
2022-06-23 | The error codes of the API operation change. | |||||||||
| ||||||||||
2021-12-23 | The error codes of the API operation change. | |||||||||
| ||||||||||
2021-12-23 | The error codes of the API operation change. | |||||||||
| ||||||||||
2021-12-23 | The error codes of the API operation change. | |||||||||
|