tencent cloud

APIs

ModifyKafkaRecharge

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-06-10 15:01:48

1. API Description

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

This API is used to modify a Kafka data subscription task.

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: ModifyKafkaRecharge.
Version Yes String Common Params. The value used for this API: 2020-10-16.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Id Yes String Import configuration Id.
-Create a Kafka Data Subscription Task (https://www.tencentcloud.com/document/product/614/94448?from_cn_redirect=1) to obtain the Kafka import configuration Id.
-Get the Kafka import configuration Id by searching the Kafka Data Subscription Task list.
TopicId Yes String Import the target topic ID of CLS.
-Obtain the log topic Id through Get Log Topic List.
- Obtain the log topic Id through Create Log Topic.
Name No String Kafka data import configuration name
KafkaType No Integer Import Kafka type. 0: Tencent Cloud CKafka; 1: user-built kafka.
KafkaInstance No String Tencent Cloud CKafka instance ID. Required when KafkaType is 0.
- Obtain the instance id by searching the instance list information (https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1).
ServerAddr No String Service address, which is required when KafkaType is 1.
IsEncryptionAddr No Boolean Whether ServerAddr is an encrypted connection. Required when KafkaType is 1.
Protocol No KafkaProtocolInfo Encrypted access protocol. It is required when the parameter KafkaType is 1 and the parameter IsEncryptionAddr is true.
UserKafkaTopics No String List of Kafka-related topics to be imported by the user, separated by commas.

-When Kafka Type is Tencent Cloud CKafka: Get TopicName by searching the topic list (https://www.tencentcloud.com/document/product/597/40847?from_cn_redirect=1).
ConsumerGroupName No String Kafka consumer group name
LogRechargeRule No LogRechargeRuleInfo Log import rule
StatusControl No Integer Import control, 1: suspend; 2: start.
UserKafkaMeta No UserKafkaMeta User kafka extended information

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 Modifying the Kafka Import Configurations

Modifying the Kafka Import Configurations

Input Example

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

{
    "Id": "1014cc79-f006-48e4-8820-1dc7270540c0",
    "TopicId": "06bdb6f6-ae6e-41f6-9e7b-fcab91cb0111",
    "KafkaType": 0,
    "KafkaInstance": "ckafka-2vrgxbxa",
    "ServerAddr": "",
    "IsEncryptionAddr": false,
    "Protocol": {
        "Protocol": "",
        "Mechanism": "",
        "UserName": "",
        "Password": ""
    },
    "UserKafkaTopics": "topic-subs-0px4qkvu32-cdb-5zi7jf11",
    "ConsumerGroupName": "",
    "LogRechargeRule": {
        "RechargeType": "json_log",
        "LogRegex": "",
        "UnMatchLogSwitch": true,
        "UnMatchLogKey": "LogParseFailure",
        "UnMatchLogTimeSrc": 0,
        "EncodingFormat": 0,
        "DefaultTimeSwitch": true,
        "DefaultTimeSrc": 1,
        "TimeKey": "",
        "TimeRegex": "",
        "TimeFormat": "",
        "TimeZone": "UTC+08:00",
        "Metadata": [
            "kafka_topic",
            "kafka_partition",
            "kafka_offset",
            "kafka_timestamp"
        ],
        "Keys": []
    }
}

Output Example

{
    "Response": {
        "RequestId": "0813f2a8-666f-47d4-886b-bf63bdcbc8d3"
    }
}

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 Operation failed.
InternalError Internal error.
InvalidParameter Incorrect parameter.
InvalidParameterValue Incorrect parameter value.
MissingParameter Missing parameter.
OperationDenied.AccountDestroy The account has been terminated.
OperationDenied.AccountIsolate The account has overdue payments.
OperationDenied.AccountNotExists The account does not exist.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック