Modifying the Configuration of a Smart Connect Task
Function
This API is used to modify the Smart Connect task configuration.
Calling Method
For details, see Calling APIs.
URI
PUT /v2/{project_id}/instances/{instance_id}/connector/tasks/{task_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Range: N/A Default Value: N/A |
| instance_id | Yes | String | Definition: Instance ID. You can call the API for querying all instances to obtain the instance ID. The instance ID is in the response body. Constraints: N/A Range: N/A Default Value: N/A |
| task_id | Yes | String | Definition: Task ID. You can call the API for querying Smart Connect tasks to obtain the Smart Connect task ID. The Smart Connect task ID is in the response body. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| task_name | No | String | Definition: Smart Connect task name. Range: N/A |
| topics | No | String | Definition: Topic of a Smart Connect task. Range: N/A |
| topics_regex | No | String | Definition: Topic regular expression of a Smart Connect task. Range: N/A |
| source_type | No | String | Definition: Source type of a Smart Connect task. Range: |
| source_task | No | Definition: Source configuration of a Smart Connect task. | |
| sink_type | No | String | Definition: Target type of a Smart Connect task. Range: |
| sink_task | No | Definition: Target configuration of a Smart Connect task. | |
| id | No | String | Definition: ID of a Smart Connect task. Range: N/A |
| status | No | String | Definition Status of a Smart Connect task. Range |
| create_time | No | Long | Definition: Time when a Smart Connect task was created. Range: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| current_cluster_name | No | String | Definition: Current Kafka instance name. (Displayed only when the source type is Kafka.) Range: N/A |
| cluster_name | No | String | Definition: Target Kafka instance name. (Displayed only when the source type is Kafka.) Range: N/A |
| user_name | No | String | Definition: Username of a target Kafka instance. (Displayed only when the source type is Kafka.) Range: N/A |
| sasl_mechanism | No | String | Definition: Target Kafka authentication mode. (Displayed only when the source type is Kafka.) Range: |
| instance_id | Yes | String | Definition: Target Kafka instance ID. (Displayed only when the source type is Kafka.) Range: N/A |
| bootstrap_servers | No | String | Definition: Target Kafka instance address. (Displayed only when the source type is Kafka.) Range: N/A |
| security_protocol | No | String | Definition: Target Kafka authentication mode. (Displayed only when the source type is Kafka.) Range: |
| direction | No | String | Definition: Synchronization direction. (Displayed only when the source type is Kafka.) Range: |
| sync_consumer_offsets_enabled | No | Boolean | Definition: Whether to synchronize the consumer offset. (Displayed only when the source type is Kafka.) Range: |
| replication_factor | No | Integer | Definition: Number of replicas. (Displayed only when the source type is Kafka.) Range: N/A |
| task_num | No | Integer | Definition: Number of tasks. (Displayed only when the source type is Kafka.) Range: N/A |
| rename_topic_enabled | No | Boolean | Definition: Whether to rename a topic. (Displayed only when the source type is Kafka.) Range: |
| provenance_header_enabled | No | Boolean | Definition: Whether to add the source header. (Displayed only when the source type is Kafka.) Range: |
| consumer_strategy | No | String | Definition: Start offset. (Displayed only when the source type is Kafka.) Range: |
| compression_type | No | String | Definition: Compression algorithm. (Displayed only when the source type is Kafka.) Range: |
| topics_mapping | No | String | Definition: Topic mapping. (Displayed only when the source type is Kafka.) Range: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| consumer_strategy | No | String | Definition: Dump start offset. (Displayed only when the target type is OBS.) Range: |
| destination_file_type | No | String | Definition Dump file format. Only text is supported. (Displayed only when the target type is OBS.) Range TEXT |
| deliver_time_interval | No | Integer | Definition: Dumping period (s). (Displayed only when the target type is OBS.) Range: N/A |
| obs_bucket_name | No | String | Definition: Dumping address. (Displayed only when the target type is OBS.) Range: N/A |
| obs_path | No | String | Definition: Dump directory. (Displayed only when the target type is OBS.) Range: N/A |
| partition_format | No | String | Definition: Time directory format. (Displayed only when the target type is OBS.) Range: N/A |
| record_delimiter | No | String | Definition: Line break. (Displayed only when the target type is OBS.) Range: N/A |
| store_keys | No | Boolean | Definition: Storage key. (Displayed only when the target type is OBS.) Range: N/A |
| obs_part_size | No | Integer | Definition: Size (in bytes) of each file to be uploaded. The default value is 5242880. (Displayed only when the target type is OBS.) Range: N/A |
| flush_size | No | Integer | Definition: Size of flushed data. (Displayed only when the target type is OBS.) Range: N/A |
| timezone | No | String | Definition: Time zone. (Displayed only when the target type is OBS.) Range: N/A |
| schema_generator_class | No | String | Definition: schema_generator class. The default value is io.confluent.connect.storage.hive.schema.DefaultSchemaGenerator. (Displayed only when the target type is OBS.) Range: N/A |
| partitioner_class | No | String | Definition: partitioner class. The default value is io.confluent.connect.storage.partitioner.TimeBasedPartitioner. (Displayed only when the target type is OBS.) Range: N/A |
| value_converter | No | String | Definition: Value converter. The default value is org.apache.kafka.connect.converters.ByteArrayConverter. (Displayed only when the target type is OBS.) Range: N/A |
| key_converter | No | String | Definition: Key converter. The default value is org.apache.kafka.connect.converters.ByteArrayConverter. (Displayed only when the target type is OBS.) Range: N/A |
| kv_delimiter | No | String | Definition: Key-value delimiter. The default value is :. (Displayed only when the target type is OBS.) Range: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| task_name | String | Definition: Smart Connect task name. Range: N/A |
| topics | String | Definition: Topic of a Smart Connect task. Range: N/A |
| topics_regex | String | Definition: Topic regular expression of a Smart Connect task. Range: N/A |
| source_type | String | Definition: Source type of a Smart Connect task. Range: |
| source_task | Definition: Source configuration of a Smart Connect task. | |
| sink_type | String | Definition: Target type of a Smart Connect task. Range: |
| sink_task | Definition: Target configuration of a Smart Connect task. | |
| id | String | Definition: ID of a Smart Connect task. Range: N/A |
| status | String | Definition Status of a Smart Connect task. Range |
| create_time | Long | Definition: Time when a Smart Connect task was created. Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| current_cluster_name | String | Definition: Current Kafka instance name. (Displayed only when the source type is Kafka.) Range: N/A |
| cluster_name | String | Definition: Target Kafka instance name. (Displayed only when the source type is Kafka.) Range: N/A |
| user_name | String | Definition: Username of a target Kafka instance. (Displayed only when the source type is Kafka.) Range: N/A |
| sasl_mechanism | String | Definition: Target Kafka authentication mode. (Displayed only when the source type is Kafka.) Range: |
| instance_id | String | Definition: Target Kafka instance ID. (Displayed only when the source type is Kafka.) Range: N/A |
| bootstrap_servers | String | Definition: Target Kafka instance address. (Displayed only when the source type is Kafka.) Range: N/A |
| security_protocol | String | Definition: Target Kafka authentication mode. (Displayed only when the source type is Kafka.) Range: |
| direction | String | Definition: Synchronization direction. (Displayed only when the source type is Kafka.) Range: |
| sync_consumer_offsets_enabled | Boolean | Definition: Whether to synchronize the consumer offset. (Displayed only when the source type is Kafka.) Range: |
| replication_factor | Integer | Definition: Number of replicas. (Displayed only when the source type is Kafka.) Range: N/A |
| task_num | Integer | Definition: Number of tasks. (Displayed only when the source type is Kafka.) Range: N/A |
| rename_topic_enabled | Boolean | Definition: Whether to rename a topic. (Displayed only when the source type is Kafka.) Range: |
| provenance_header_enabled | Boolean | Definition: Whether to add the source header. (Displayed only when the source type is Kafka.) Range: |
| consumer_strategy | String | Definition: Start offset. (Displayed only when the source type is Kafka.) Range: |
| compression_type | String | Definition: Compression algorithm. (Displayed only when the source type is Kafka.) Range: |
| topics_mapping | String | Definition: Topic mapping. (Displayed only when the source type is Kafka.) Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| consumer_strategy | String | Definition: Dump start offset. (Displayed only when the target type is OBS.) Range: |
| destination_file_type | String | Definition Dump file format. Only text is supported. (Displayed only when the target type is OBS.) Range TEXT |
| deliver_time_interval | Integer | Definition: Dumping period (s). (Displayed only when the target type is OBS.) Range: N/A |
| obs_bucket_name | String | Definition: Dumping address. (Displayed only when the target type is OBS.) Range: N/A |
| obs_path | String | Definition: Dump directory. (Displayed only when the target type is OBS.) Range: N/A |
| partition_format | String | Definition: Time directory format. (Displayed only when the target type is OBS.) Range: N/A |
| record_delimiter | String | Definition: Line break. (Displayed only when the target type is OBS.) Range: N/A |
| store_keys | Boolean | Definition: Storage key. (Displayed only when the target type is OBS.) Range: N/A |
| obs_part_size | Integer | Definition: Size (in bytes) of each file to be uploaded. The default value is 5242880. (Displayed only when the target type is OBS.) Range: N/A |
| flush_size | Integer | Definition: Size of flushed data. (Displayed only when the target type is OBS.) Range: N/A |
| timezone | String | Definition: Time zone. (Displayed only when the target type is OBS.) Range: N/A |
| schema_generator_class | String | Definition: schema_generator class. The default value is io.confluent.connect.storage.hive.schema.DefaultSchemaGenerator. (Displayed only when the target type is OBS.) Range: N/A |
| partitioner_class | String | Definition: partitioner class. The default value is io.confluent.connect.storage.partitioner.TimeBasedPartitioner. (Displayed only when the target type is OBS.) Range: N/A |
| value_converter | String | Definition: Value converter. The default value is org.apache.kafka.connect.converters.ByteArrayConverter. (Displayed only when the target type is OBS.) Range: N/A |
| key_converter | String | Definition: Key converter. The default value is org.apache.kafka.connect.converters.ByteArrayConverter. (Displayed only when the target type is OBS.) Range: N/A |
| kv_delimiter | String | Definition: Key-value delimiter. The default value is :. (Displayed only when the target type is OBS.) Range: N/A |
Example Requests
PUT https://{endpoint}/v2/{project_id}/instances/{instance_id}/connector/tasks/{task_id}
{
"source_type" : "KAFKA_REPLICATOR_SOURCE",
"sink_type" : "NONE",
"topics" : "topic-1643449744",
"source_task" : {
"compression_type" : "gzip",
"task_num" : 3,
"replication_factor" : 3
}
} Example Responses
Status code: 200
Successful
{
"task_name" : "smart-connect-1460978305",
"topics" : "topic-1643449744",
"source_task" : {
"current_cluster_name" : "A",
"cluster_name" : "B",
"direction" : "pull",
"bootstrap_servers" : "192.168.111.91:9092192.168.111.139:9092192.168.111.193:9092",
"instance_id" : "59d02e58-****-****-****-********",
"consumer_strategy" : "earliest",
"sync_consumer_offsets_enabled" : false,
"rename_topic_enabled" : true,
"provenance_header_enabled" : true,
"security_protocol" : "PLAINTEXT",
"sasl_mechanism" : "PLAIN",
"user_name" : "",
"topics_mapping" : null,
"compression_type" : "gzip",
"task_num" : 3,
"replication_factor" : 3
},
"source_type" : "KAFKA_REPLICATOR_SOURCE",
"sink_task" : null,
"sink_type" : "NONE",
"id" : "5cf658a2-9157-4b35-b4e6-13ee7a23154b",
"status" : "RUNNING",
"create_time" : 1764301161335
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Successful |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.