UpgradeDBInstance

Last updated: 2020-09-11 14:46:31

1. API Description

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

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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.

3. Output Parameters

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.

4. Example

Example1 Upgrading TencentDB instance

Input Example

https://cdb.tencentcloudapi.com/?Action=UpgradeDBInstance
&InstanceId=cdb-6si6qy6p
&Memory=1000
&Volume=50
&<Common request parameters>

Output Example

{
  "Response": {
    "RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7",
    "DealIds": [
      "20171204110077"
    ],
    "AsyncRequestId": "a6040589-3b098df5-b551d9e5-81c6bfdc"
  }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

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?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help