Domain name for API request: cdb.intl.tencentcloudapi.com.
This API is used to upgrade the version of a cloud database instance. Supported instance types include primary instance, disaster recovery instance, and read-only instance. Before upgrade, submit an upgrade check task via SubmitInstanceUpgradeCheckJob (https://www.tencentcloud.com/document/product/236/110468?from_cn_redirect=1).
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: UpgradeDBInstanceEngineVersion. |
| Version | Yes | String | Common Params. The value used for this API: 2017-03-20. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceId | Yes | String | Instance ID, in the format such as cdb-c1nl9rpv or cdbro-c1nl9rpv. This matches the instance ID displayed on the TencentDB console. You can obtain it through the Query Instance List API, with its value being the InstanceId field in the output parameter. |
| EngineVersion | Yes | String | Database engine version of the primary instance. Supported values include 5.6, 5.7, 8.0. |
| WaitSwitch | No | Integer | The way to switch to a new instance defaults to 0. Supported values include: 0 - switch immediately, 1 - switch in a time window. When the value is 1, during the upgrade process, the switchover to a new instance will be performed in the time window, or the user can proactively call the API switch to a new instance to trigger the process. |
| UpgradeSubversion | No | Integer | Whether to upgrade the kernel subversion. Supported values: 1 - upgrade kernel subversion; 0 - upgrade database engine version. No default value. Specify the version type to upgrade. |
| MaxDelayTime | No | Integer | Delay threshold. Value ranges from 1 to 10. No default value. When not specified, the delay threshold is 0, which means the delay threshold is not set. |
| IgnoreErrKeyword | No | Integer | Whether to ignore keyword errors when upgrading from 5.7 to 8.0. The value ranges from 0 to 1. 1 means ignored, 0 means not ignored. No default value. Not specified means no action taken. |
| ParamList.N | No | Array of UpgradeEngineVersionParams | Upgrade support for specified parameters |
| Parameter Name | Type | Description |
|---|---|---|
| AsyncRequestId | String | Asynchronous Task ID. Use Query Asynchronous Task to get its execution situation. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to upgrade the version of a TencentDB instance.
POST / HTTP/1.1Host: cdb.intl.tencentcloudapi.comContent-Type: application/jsonX-TC-Action: UpgradeDBInstanceEngineVersion<common request parameters>{ "InstanceId": "cdb-8qrg9t04", "EngineVersion": "5.7"}
{
"Response": {
"RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7",
"AsyncRequestId": "d2baf2fb-cbae62df-7dd0d736-9cbd3e31"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.StatusConflict | Task status conflict. |
| InternalError.CdbError | System error. |
| InternalError.DatabaseAccessError | Internal database error. |
| InternalError.FtpError | File transfer exception |
| InternalError.TradeError | Transaction system error. |
| InternalError.UndefinedError | Unknown error |
| InvalidParameter | Parameter error. |
| InvalidParameter.InstanceNotFound | The instance does not exist. |
| OperationDenied | Operation denied. |
| OperationDenied.ActionNotSupport | Unsupported operation. |
| OperationDenied.UserHasNoStrategy | This account is not authorized to access the requested resource. |
フィードバック