tencent cloud

APIs

CreateCdbProxyAddress

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-06-01 17:02:53

1. API Description

Domain name for API request: cdb.intl.tencentcloudapi.com.

This API is used to add a proxy address for database proxy.

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: CreateCdbProxyAddress.
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.
ProxyGroupId Yes String Proxy group ID, which can be obtained through the DescribeCdbProxyInfo API.
WeightMode Yes String Assignment mode of weights. Valid values: system (auto-assigned), custom.
IsKickOut Yes Boolean Whether to remove delayed read-only instances from the proxy group. Valid values: true, false.
MinCount Yes Integer Least read-only instances. Minimum value: 0
MaxDelay Yes Integer Delay removal threshold, minimum value: 1, range: 1–10000. The value is an integer.
FailOver Yes Boolean Whether to enable failover. Valid values: true, false.
AutoAddRo Yes Boolean Whether to automatically add newly created read-only instances. Valid values: true, false.
ReadOnly Yes Boolean Whether it is read-only. Valid values: true, false.
TransSplit Yes Boolean Whether to enable transaction splitting. Valid values: true, false.
ProxyAllocation.N Yes Array of ProxyAllocation Assignment of read/write weights
UniqVpcId Yes String VPC ID. Obtain through the DescribeDBInstances API.
UniqSubnetId Yes String Private subnet ID. Obtain through the DescribeDBInstances API.
ConnectionPool No Boolean Whether to enable connection pool. Off by default.
Note: If you need to use the database proxy connection pool capability, the kernel minor version of the MySQL 8.0 primary instance must be equal to or greater than MySQL 8.0 20230630.
Desc No String Description
Vip No String IP. Leave it blank to default to a random supported IP in the selected VPC.
VPort No Integer Port. Default value 3306.
SecurityGroup.N No Array of String Security group
ConnectionPoolType No String Connection pool type. Available values: transaction (transaction-level connection pool), connection (session-level connection pool). This parameter is valid only when ConnectionPool is true. Default value: connection.
AutoLoadBalance No Boolean Whether adaptive load balancing is enabled. Off by default.
AccessMode No String Access mode. nearBy - proximity access, balance - balanced allocation. Default value: nearBy.

3. Output Parameters

Parameter Name Type Description
AsyncRequestId String Asynchronous Task ID
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 Creating a Database Proxy Address

Create a database proxy host address

Input Example

POST / HTTP/1.1
Host: cdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateCdbProxyAddress
<Common request parameters>

{
    "ProxyGroupId": "proxy-il2nlsdn",
    "UniqVpcId": "vpc-ixw3ll2d",
    "UniqSubnetId": "subnet-0z3r56vq",
    "IsKickOut": true,
    "MinCount": 1,
    "MaxDelay": 10,
    "WeightMode": "custom",
    "FailOver": true,
    "AutoAddRo": true,
    "ReadOnly": false,
    "TransSplit": false,
    "ConnectionPool": true,
    "ProxyAllocation": [
        {
            "Region": "ap-guangzhou",
            "Zone": "ap-guangzhou-2",
            "ProxyInstance": [
                {
                    "InstanceId": "cdb-aykuksx3",
                    "Weight": 100
                }
            ]
        }
    ]
}

Output Example

{
    "Response": {
        "RequestId": "3689c0eb-a92d-77ce-0ee2-17d99f604e64",
        "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
FailedOperation.DescribeProxyGroupError Failed to query database proxy.
FailedOperation.VpcIpInUseError The IP has been occupied.
FailedOperation.VpcIpInvalidError Invalid IP address
InternalError.UnknownError Unknown error
InvalidParameterValue.DataConvertError Data conversion failed.
OperationDenied.ProxyAddressLimitError The number of the proxy addresses exceeds the limit.
OperationDenied.ProxyUpgradeTaskStatusError This operation is not allowed during database proxy upgrade task.

도움말 및 지원

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

피드백