Domain name for API request: cdb.tencentcloudapi.com.
This API is used to upgrade or downgrade a TencentDB instance, which can be a primary instance, disaster recovery instance, or read-only instance.
A maximum of 20 requests can be initiated per second for this API.
Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: cdb.ap-shanghai-fsi.tencentcloudapi.com
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 parameter. The value used for this API: UpgradeDBInstance. |
Version | Yes | String | Common parameter. The value used for this API: 2017-03-20. |
Region | Yes | String | Common parameter. For more information, please see the list of regions supported by the product. |
InstanceId | Yes | String | Instance ID in the format of cdb-c1nl9rpv or cdbro-c1nl9rpv . It is the same as the instance ID displayed on the TencentDB Console page. You can use the DescribeDBInstances API to query the ID, whose value is the InstanceId value in output parameters. |
Memory | Yes | Integer | Memory size in MB after upgrade. To ensure that the Memory value to be passed in is valid, please use the DescribeDBZoneConfig API to query the specifications of the memory that can be upgraded to. |
Volume | Yes | Integer | Disk size in GB after upgrade. To ensure that the Volume value to be passed in is valid, please use the DescribeDBZoneConfig API to query the specifications of the disk that can be upgraded to. |
ProtectMode | No | Integer | Data replication mode. Valid values: 0 (async), 1 (semi-sync), 2 (strong sync). This parameter can be specified when upgrading primary instances and is meaningless for read-only or disaster recovery instances. |
DeployMode | No | Integer | Deployment mode. Valid values: 0 (single-AZ), 1 (multi-AZ). Default value: 0. This parameter can be specified when upgrading primary instances and is meaningless for read-only or disaster recovery instances. |
SlaveZone | No | String | AZ information of secondary database 1, which is the Zone value of the instance by default. This parameter can be specified when upgrading primary instances in multi-AZ mode and is meaningless for read-only or disaster recovery instances. You can use the DescribeDBZoneConfig API to query the supported AZs. |
EngineVersion | No | String | Version of primary instance database engine. Valid values: 5.5, 5.6, 5.7. |
WaitSwitch | No | Integer | Mode of switch to new instance. Valid values: 0 (switch immediately), 1 (switch within a time window). Default value: 0. If the value is 1, the switch process will be performed within a time window. Or, you can call the SwitchForUpgrade API to trigger the process. |
BackupZone | No | String | AZ information of secondary database 2, which is empty by default. This parameter can be specified when upgrading primary instances and is meaningless for read-only or disaster recovery instances. |
InstanceRole | No | String | Instance type. Valid values: master (primary instance), dr (disaster recovery instance), ro (read-only instance). Default value: master. |
Parameter Name | Type | Description |
---|---|---|
DealIds | Array of String | Order ID. |
AsyncRequestId | String | Async task request ID, which can be used to query the execution result of an async task. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
https://cdb.tencentcloudapi.com/?Action=UpgradeDBInstance
&InstanceId=cdb-6si6qy6p
&Memory=1000
&Volume=50
&<Common request parameters>
{
"Response": {
"RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7",
"DealIds": [
"20171204110077"
],
"AsyncRequestId": "a6040589-3b098df5-b551d9e5-81c6bfdc"
}
}
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.DatabaseAccessError | Internal database error. |
InternalError.TradeError | Transaction system error. |
InvalidParameter | Parameter error. |
Was this page helpful?