tencent cloud



Last updated: 2023-06-26 15:13:01

1. API Description

Domain name for API request: dcdb.tencentcloudapi.com.

This API is used to upgrade a pay-as-you-go TDSQL instance.

A maximum of 20 requests can be initiated per second for this API.

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 Params. The value used for this API: UpgradeHourDCDBInstance.
Version Yes String Common Params. The value used for this API: 2018-04-11.
Region No String Common Params. This parameter is not required for this API.
InstanceId Yes String Instance ID to be upgraded in the format of dcdbt-ow728lmc, which can be obtained through the DescribeDCDBInstances API.
UpgradeType Yes String Upgrade type. Valid values:
  • ADD: Add a new shard

  • EXPAND: Upgrade the existing shads

  • SPLIT: Split data of the existing shads to the new ones
  • AddShardConfig No AddShardConfig Add shards when UpgradeType is ADD.
    ExpandShardConfig No ExpandShardConfig Expand shard when UpgradeType is EXPAND.
    SplitShardConfig No SplitShardConfig Split shard when UpgradeType is SPLIT.
    SwitchStartTime No Timestamp Switch start time in the format of "2019-12-12 07:00:00", which is no less than one hour and within 3 days from the current time.
    SwitchEndTime No Timestamp Switch end time in the format of "2019-12-12 07:15:00", which must be later than the start time.
    SwitchAutoRetry No Integer Whether to retry automatically. Valid values: 0 (no), 1 (yes).
    Zones.N No Array of String The list of new AZs specified in deployment modification. The first one is the source AZ, and the rest are replica AZs.

    3. Output Parameters

    Parameter Name Type Description
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Upgrading a pay-as-you-go TDSQL instance

    This example shows you how to upgrade a pay-as-you-go TDSQL instance.

    Input Example

    https://dcdb.tencentcloudapi.com/?Action=UpgradeHourDCDBInstance&InstanceId=dcdbt-fdpjf5zh&UpgradeType=ADD&AddShardConfig.ShardCount=2&AddShardConfig.ShardMemory=2&AddShardConfig.ShardStorage=10&<common request parameters>

    Output Example

        "Response": {
            "RequestId": "9b59ee51-0e13-1c2f-dedb-59fabe9d7f4a"

    5. Developer Resources


    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
    FailedOperation.CreateOrderFailed Failed to create an order.
    InternalError.CreateFlowError Failed to create a process
    InternalError.OperateDatabaseFailed Database operation failed.
    InvalidParameter Parameter error.
    InvalidParameter.InstanceNotFound Failed to find the requested instance.
    InvalidParameter.NotSupportedPayMode The API doesn’t support instances of this payment mode
    InvalidParameterValue.SpecIdIllegal The specification information of the database instance was not found.
    ResourceUnavailable.InstanceStatusAbnormal Incorrect database instance status. Operations are not allowed.
    UnauthorizedOperation.PermissionDenied You have no permission to manipulate this API or resource.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support