tencent cloud

APIs

ModifyLocalBinlogConfig

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-06-03 10:38:08

1. API Description

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

This API is used to modify the local binlog retention policy of an 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: ModifyLocalBinlogConfig.
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 such as cdb-c1nl9rpv. This matches the instance ID displayed on the TencentDB console.
SaveHours Yes Integer Local binlog retention duration. Values for different instances are as follows:
1. The local binlog retention duration (hr) for cloud disk edition instances, dual-node instances, and three-node instances defaults to 120, with a range of 6 - 168.
2. The retention duration of local binlog for disaster recovery instance defaults to 120 hr, with a range of 120 - 168.
3. The retention duration (hr) of local binlog for a single-node cloud disk instance defaults to 120, with a range of 0 - 168.
4. If a dual-node instance or three-node instance has no disaster recovery instance, the retention duration (hr) of local binlog for the primary instance ranges from 6 to 168. If a dual-node instance or three-node instance has a disaster recovery instance, or you want to add a disaster recovery instance to a dual-node instance or three-node instance, to avoid synchronization exception, the retention duration (hr) of local binlog for the primary instance cannot be set to less than 120 hr, ranging from 120 to 168.
MaxUsage Yes Integer Local binlog space utilization. Valid values: [30,50].

3. Output Parameters

Parameter Name Type Description
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 Modify local binlog retention policy

Input Example

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

{
    "InstanceId": "cdb-c1nl9rpv",
    "MaxUsage": 30,
    "SaveHours": 72
}

Output Example

{
    "Response": {
        "RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7"
    }
}

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
InternalError.DBRecordNotExistError The database instance does not exist.
InternalError.HttpError Exceptional HTTP request
InternalError.UnknownError Unknown error
InvalidParameterValue.InvalidParameterValueError Invalid parameter value
OperationDenied.InstanceUnsupportedOperateError The instance does not support this operation.

도움말 및 지원

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

피드백