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.
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 |
| 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. |
Modifying the Kafka Import Configurations
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": []
}
}
{
"Response": {
"RequestId": "0813f2a8-666f-47d4-886b-bf63bdcbc8d3"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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. |
文档反馈