You can call the UpgradeDBInstanceKernelVersion operation to update the minor engine version of an ApsaraDB RDS instance.

An update to the minor engine version enhances performance, introduces new features, and fixes known bugs. For more information, see Update the minor engine version of an ApsaraDB RDS for MySQL instance, Update the minor engine version of an ApsaraDB RDS for SQL Server instance and Update the minor engine version of an ApsaraDB RDS for PostgreSQL instance.

Note This operation is supported only for instances that run the MySQL, SQL Server, or PostgreSQL database engine.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpgradeDBInstanceKernelVersion

The operation that you want to perform. Set the value to UpgradeDBInstanceKernelVersion.

DBInstanceId String Yes rm-bpxxxxx

The ID of the instance. This parameter is supported only for instances that run the MySQL, PostgreSQL, or SQL Server database engine.

Note
  • If the instance runs PostgreSQL, you must make sure that the instance is equipped with standard SSDs or enhanced SSDs (ESSDs). If the instance is equipped with local SSDs, you must call the RestartDBInstance operation to restart the instance. ApsaraDB RDS automatically updates the instance to the latest minor engine version during the restart process.
  • If the instance runs SQL Server, you must make sure that the instance runs SQL Server 2019.
UpgradeTime String No Immediate

The method that is used to update the minor engine version. Valid values:

  • Immediate: The minor engine version is immediately updated.
  • MaintainTime: The minor engine version is updated during the maintenance window that you specify. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
  • SpecifyTime: The minor engine version is updated at the point in time you specify.

Default value: Immediate.

SwitchTime String No 2020-01-15T00:00:00Z

The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime.
TargetMinorVersion String No xcluster80_20210305

The minor engine version to which you want to update the instance. You must specify the minor engine version in one of the following formats:

  • PostgreSQL: rds_postgres_<Major engine version>00_<Minor engine version>. Example: rds_postgres_1200_20200830.
  • MySQL: <RDS edition>_<Minor engine version>. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions and MySQL versions are supported:
    • rds: The instance runs RDS Basic Edition or High-availability Edition.
    • xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
    • xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
  • SQLServer: <Minor engine version>. Example: 15.0.4073.23.

If you do not specify this parameter, the instance is updated to the latest minor engine version.

Response parameters

Parameter Type Example Description
DBInstanceName String rm-bpxxxxx

The ID of the instance.

RequestId String DA2ECBA0-4745-4491-9166-799FF8984AC9

The ID of the request.

TargetMinorVersion String xcluster80_20210305

The new minor engine version of the instance.

TaskId String 226917711

The ID of the task.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=UpgradeDBInstanceKernelVersion
&DBInstanceId=rm-bpxxxxx
&UpgradeTime=SpecifyTime
&SwitchTime=2020-01-15T00:00:00Z
&TargetMinorVersion=xcluster80_20210305
&<Common request parameters>

Sample success responses

XML format

<UpgradeDBInstanceKernelVersion>
      <TaskId>226917711</TaskId>
      <RequestId>DA2ECBA0-4745-4491-9166-799FF8984AC9</RequestId>
      <TargetMinorVersion>xcluster80_20210305</TargetMinorVersion>
      <DBInstanceName>rm-bpxxxxx</DBInstanceName>
</UpgradeDBInstanceKernelVersion>

JSON format

{
	"TaskId": "226917711",
	"RequestId": "DA2ECBA0-4745-4491-9166-799FF8984AC9",
	"TargetMinorVersion": "xcluster80_20210305",
	"DBInstanceName": "rm-bpxxxxx"
}

Error codes

HTTP status code Error code Error message Description
400 MissingParameter.MinorVersionTag You must specify the parameter MinorVersionTag. The error message returned because the new minor engine version of the instance is not specified.
400 EngineNotSupported The engine does not support the operation. The error message returned because this operation is not supported for the database engine that is run on the instance.
404 InvalidDBInstanceName.NotFound The database instance does not exist. The error message returned because the instance cannot be found.
400 IncorrectDBInstanceState The current instance state does not support this operation. The error message returned because this operation is not supported for the state in which the instance stays.
403 IncorrectDBInstanceLockMode Current DB instance lock mode does not support this operation. The error message returned because the lock mode of the instance does not support this operation.
400 TaskExists Specified task have existed. The error message returned because the specified task is already exist.

For a list of error codes, visit the API Error Center.