All Products
Search
Document Center

ApsaraDB RDS:UpgradeDBInstanceEngineVersion

Last Updated:Mar 21, 2023

You can call the UpgradeDBInstanceEngineVersion operation to upgrade the major engine version of an ApsaraDB RDS for MySQL instance.

Operation Description

NoteThe fee that you must pay after the upgrade varies based on the instance types and storage types of the original instance and the new instance.

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.
OperationAccess levelResource typeCondition keyAssociation operation
rds:UpgradeDBInstanceEngineVersionWRITE
  • RDS
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

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
DBInstanceIdstringYes

The ID of the instance.

rm-uf6wjk5xxxxxxx
EngineVersionstringYes

The major engine version that the new instance runs. Valid values:

  • 8.0
  • 5.7
  • 5.6
5.7
EffectiveTimestringNo

The time when you want the change to take effect. Valid values:

  • Immediate: The change immediately takes effect.
  • MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.

Default value: Immediate.

Immediate

Response parameters

ParameterTypeDescriptionExample
object
TaskIdstring

The ID of the task.

10254125
RequestIdstring

The ID of the request.

65BDA532-28AF-4122-AA39-B382721EEE64

Examples

Sample success responses

JSONformat

{
  "TaskId": "10254125",
  "RequestId": "65BDA532-28AF-4122-AA39-B382721EEE64"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidOrderTask.NotSupportThe Current InstanceId exist Order Task in RDS.Uncompleted order tasks are found in the RDS instance. Please try again later.
400InvalidEVENTCurrent DB instance has event schedule, this operation is not supported.-
400InvalidSSLstatusCurrent DB instance has SSL enabled, this operation is not supported.This operation is not supported because this instance has SSL enabled.
400InvalidTDEstatusCurrent DB instance has TDE enabled, this operation is not supported.This operation is not supported because TDE is enabled on the instance.
400InvalidDBInstanceConnType.FormatSpecified DB instance conn type is not valid.The operation failed. The operation is not supported for the connection type of the RDS instance.
400UnsupportedReadOrBakReadStateCurrent DB instance has read or bak read instance running in unsupported states.-
403IncorrectDBInstanceStateCurrent DB instance state does not support this operation.-
403IncorrectEngineVersionThe engine version does not support the operation.The operation failed. The operation is not supported for the database engine version of the RDS instance.
403IncorrectEngineTypeMyisamCurrent 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.
403InvalidAccountName.FormatCurrent DB instance has account aliyun_root,and it does not support this operation.-
403InvalidInstanceLevel.MalformedCurrent DB instance level does not support this operation.The specified database instance type does not support this operation.
403IncorrectDBInstanceLockModeCurrent DB instance lock mode does not support this operation.The operation failed. The RDS instance is locked.
403UnsupportedReadOrBakReadStateCurrent DB instance has read or bak read running in unsupport statesThe current instance is in the unsupported read or bak read state.
404InvalidDBInstance.NotFoundThe 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 timeSummary of changesOperation
2022-07-19The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 403 change
    delete Error Codes: 400
    delete Error Codes: 404
2022-06-23The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2021-12-23The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Added Error Codes: 403
    Added Error Codes: 404
2021-12-23The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    Error Codes 403 change
    delete Error Codes: 404
2021-12-23The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404