tencent cloud

TencentDB for MySQL

소식 및 공지 사항
제품 동향
신규 사용자 가이드
제품 소개
제품 개요
제품 장점
응용 시나리오
데이터베이스 아키텍처
격리 정책
제품 기능 목록
데이터베이스 인스턴스
고가용성(멀티 가용존)
리전 및 가용존
자체개발 커널
TXSQL 커널 개요
기능적 특성
성능적 특성
보안적 특성
안정적 특성
구매 가이드
과금 개요
구매 방법
연장 안내
연체 안내
환불 안내
인스턴스 비용 조정 설명
백업 공간 과금 안내
시작하기
시작 개요
MySQL 인스턴스 생성
운영 가이드
사용 제한
운영 개요
인스턴스의 점검 관리
인스턴스 프로모션
인스턴스 확장
데이터베이스 프록시
데이터베이스 관리(DMC)
계정 관리
매개변수 설정
백업과 롤백
데이터 마이그레이션
네트워크 및 보안
모니터링 및 알람
로그 센터
태그
사례 튜토리얼
TencentDB for MySQL의 사용 규범
애플리케이션 구성 자동 재연결
MySQL 마스터 인스턴스 매개변수 수정의 영향
MyISAM에서 InnoDB로의 자동 변환 제한
TencentDB for MySQL을 위한 VPC 생성
TencentDB for MySQL를 통해 비즈니스 부하 능력 향상
2리전 3데이터센터 재해 복구 아키텍처 구축
읽기/쓰기 분리로 TencentDB for MySQL 성능 향상
DTS를 사용하여 InnoDB에서 RocksDB로 데이터 마이그레이션
웹 애플리케이션을 위한 LAMP 스택 구축
Drupal 웹사이트 구축
Python을 통해 MySQL API 사용
백서
성능 백서
보안 백서
장애 처리
연결 관련
성능 관련
인스턴스 데이터 동기화 딜레이
케이스 인센시티브 설정 실패
API문서
History
Introduction
API Category
Instance APIs
Making API Requests
Data Import APIs
Database Proxy APIs
Database Audit APIs
Security APIs
Task APIs
Backup APIs
Account APIs
Rollback APIs
Parameter APIs
Database APIs
Monitoring APIs
Log-related API
Data Types
Error Codes
FAQs
과금 관련
백업 관련
롤백 관련
로그인
매개변수 수정
업그레이드 관련
계정 권한
성능 메모리
유지보수 관련 FAQ
데이터 마이그레이션
기능 특징
콘솔 관련
로그 관련
API 2.0에서 3.0으로 전환 가이드
Service Agreement
Service Level Agreement
Terms of Service
범용 참고
표준 및 인증
고객센터
용어집

UpgradeDBInstance

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-10-28 22:19:14

1. API Description

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.

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: 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.).

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, 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.

4. Example

Example1 Upgrading a TencentDB instance

This example shows you how to upgrade a TencentDB instance.

Input Example

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"
}

Output Example

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

5. Developer Resources

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.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.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백