Domain name for API request: cdb.intl.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 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 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 | Switch mode for accessing the 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. |
DeviceType | No | String | The resource isolation type after the instance is upgraded. Valid values: UNIVERSAL (general instance), EXCLUSIVE (dedicated instance), BASIC (basic instance). If this parameter is left empty, the resource isolation type will be the same as the original one. |
Cpu | No | Integer | The number of CPU cores after the instance is upgraded. If this parameter is left empty, the minimum value will be automatically filled based on the value specified by Memory . |
FastUpgrade | No | Integer | QuickChange options. Valid values: 0 (common upgrade), 1 (QuickChange), 2 (QuickChange first). After QuickChange is enabled, the required resources will be checked. QuickChange will be performed only when the required resources support the feature; otherwise, an error message will be returned. |
MaxDelayTime | No | Integer | Delay threshold. Value range: 1-10. Default value: 10 . |
CrossCluster | No | Integer | Whether to migrate the source node across AZs. Valid values: 0 (no), 1 (yes). Default value: 0 . If it is 1 , you can modify the source node AZ. |
ZoneId | No | String | New AZ of the source node. This field is only valid when CrossCluster is 1 . Only migration across AZs in the same region is supported. |
RoTransType | No | String | Processing logic of the intra-AZ read-only instance for cross-cluster migration. Valid values: together (intra-AZ read-only instances will be migrated to the target AZ with the source instance by default.), severally (intra-AZ read-only instances will maintain the original deployment mode and will not be migrated to the target AZ.). |
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, 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 a TencentDB instance.
POST / HTTP/1.1
Host: cdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: UpgradeDBInstance
<Common request parameters>
{
"InstanceId": "cdb-6si6qy6p",
"Volume": "50",
"Memory": "1000"
}
{
"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.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. |
Was this page helpful?