Domain name for API request: cdb.intl.tencentcloudapi.com.
This API is used to upgrade or downgrade the configuration of a cloud database instance. Supported instance types include primary instance, disaster recovery instance and read-only instance. If you need to migrate business, fill in the instance specification (CPU, memory), otherwise the system will use the minimum allowed specification by default.
A maximum of 30 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: UpgradeDBInstance. |
| 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. |
| Memory | Yes | Integer | Memory size after upgrade, unit: MB. To ensure the validity of the imported Memory value, please use the obtain the purchasable specifications of cloud databases API to get the upgradeable memory specifications. |
| Volume | Yes | Integer | Disk size after upgrade, unit: GB. To ensure the validity of the imported Volume value, please use the obtain the purchasable specifications of cloud databases API to get the upgradeable disk range. |
| ProtectMode | No | Integer | Data replication method. Supported values include: 0 - async replication, 1 - semi-sync replication, 2 - strong sync replication. Specify this parameter when upgrading the primary instance. This parameter is invalid when upgrading a read-only instance or disaster recovery instance. |
| DeployMode | No | Integer | Deployment mode, defaults to 0. Supported values include: 0 - single-AZ deployment, 1 - multi-AZ deployment. You can specify this parameter when upgrading the primary instance. This parameter is invalid when upgrading a read-only instance or disaster recovery instance. |
| SlaveZone | No | String | The availability zone information of standby database 1 matches the Zone parameter of the instance by default. You can specify this parameter when upgrading the primary instance to multi-AZ deployment. This parameter is invalid when upgrading a read-only instance or disaster recovery instance. You can query the supported availability zones via the obtain the purchasable specifications of cloud databases API. |
| EngineVersion | No | String | Database engine version of the primary instance. Supported values include 5.5, 5.6, 5.7, and 8.0. |
| WaitSwitch | No | Integer | The way to switch to a new instance defaults to 0. Supported values include: 0 - switch immediately, 1 - switch within a time window. When the value is 1, during the upgrade, the process to switch to a new instance will be performed within the time window, or the user can actively call the API Switch to a New Instance to trigger the process. |
| BackupZone | No | String | The availability zone information of standby 2 is empty by default. You can specify this parameter when upgrading the primary instance, but it is invalid when upgrading a read-only instance or disaster recovery instance. Query the supported AZs via the obtain the purchasable specifications of cloud databases API. |
| InstanceRole | No | String | Instance type, defaults to master. Supported values include: master - refers to the primary instance, dr - refers to the disaster recovery instance, ro - refers to the read-only instance. |
| DeviceType | No | String | Instance isolation type. Supported values include "UNIVERSAL" - general-purpose instance, "EXCLUSIVE" - dedicated instance, "BASIC" - BASIC edition instance. |
| Cpu | No | Integer | Number of cpu cores of the instance after upgrade. If not provided, the system will automatically fill in the minimum allowed specification based on the Memory size specified by Memory. |
| FastUpgrade | No | Integer | Whether to perform Rapid Configuration Change. 0-Normal upgrade, 1-Rapid Configuration Change, 2-Precedence to rapid change. Selecting Rapid Configuration Change will validate whether it is possible to perform ultra-fast reconfiguration based on resource status. If conditions are met, ultra-fast reconfiguration will be performed; otherwise, error information will be returned. |
| MaxDelayTime | No | Integer | Delay threshold. Value ranges from 1 to 10, default value is 10. |
| CrossCluster | No | Integer | Whether to perform cross-region migration. 0 - ordinary migration, 1 - cross-region migration, default value is 0. When set to 1, it supports changes to the primary node availability zone of the instance. |
| ZoneId | No | String | Primary node availability zone. This parameter is valid only when cross-AZ migration. You can only migrate in the same region. |
| RoTransType | No | String | For cross-cluster migration scenarios, select the processing logic for intra-AZ read-only instances. together-intra-AZ read-only instances migrate with the primary instance to the target availability zone (default option), severally-intra-AZ read-only instances maintain the original deployment mode and do not move to the target availability zone. |
| ClusterTopology | No | ClusterTopology | Topology configuration of cloud disk edition nodes. |
| CheckFastUpgradeReboot | No | Integer | Check whether in-place upgrade requires restart. 1-Check, 0-Do not check. If the value is 1 and the check shows that in-place upgrade must be restarted, the upgrade will be stopped and a notification will be returned. If in-place upgrade does not require restart, the upgrade process will proceed normally. |
| DataCheckSensitive | No | String | Data validation sensitivity. This parameter is used for non-Rapid Configuration Change scenarios. Sensitivity is calculated based on current instance specifications to determine cpu resource usage for data comparison during the migration process. Corresponding options are: "high", "normal", "low", empty by default. Parameter explanation: "high": Corresponds to high in the console, not recommended when database load is too high. "normal": Corresponds to standard in the console. "low": Corresponds to low in the console. |
| FourthZone | No | String | AZ information of standby database 3 is empty by default. You can specify this parameter when you proceed to purchase a four-node primary instance. |
| Parameter Name | Type | Description |
|---|---|---|
| DealIds | Array of String | Order ID. |
| AsyncRequestId | String | Request ID of the async task. Use this ID to query the outcome of the async task. |
| 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. |
POST / HTTP/1.1
Host: cdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: UpgradeDBInstance
<Common request parameters>
{
"InstanceId": "cdb-bxtgirxj",
"Memory": 2000,
"Volume": 110,
"ProtectMode": 1,
"WaitSwitch": 1
}
{
"Response": {
"AsyncRequestId": "ec58aec9-05d6185f-02dad5fa-b67f1dff",
"DealIds": [
"20260423753022636848431"
],
"RequestId": "fe1a3323-5968-40c1-939e-56f659c2f3c5"
}
}
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 |
|---|---|
| CdbError | Backend or process error. |
| FailedOperation.StatusConflict | Task status conflict. |
| InternalError.CauthError | Authentication failed. |
| InternalError.CdbError | System error. |
| InternalError.DatabaseAccessError | Internal database error. |
| InternalError.FtpError | File transfer exception |
| InternalError.TradeError | Transaction system error. |
| InternalError.UndefinedError | Unknown error |
| InternalError.VpcError | VPC or subnet error. |
| InvalidParameter | Parameter error. |
| OperationDenied | Operation denied. |
| OperationDenied.UserHasNoStrategy | This account is not authorized to access the requested resource. |
フィードバック