This topic describes the CreateKafkaDataSource API provided by OceanBase Migration Service (OMS) Community Edition.
Overview
You can call this operation to create a Kafka data source.
API details
Limitations
This API applies only to OMS Community Edition V4.2.12-CE and later.
Request path
POST /api/v2?Action=CreateKafkaDataSource
Request parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | The identifier of the data source. We recommend that you use a combination of Chinese characters, digits, and letters. The name cannot contain spaces and must be no longer than 32 characters. |
| region | string | The region to which the data source belongs. |
| description | string | The remarks of the data source, which cannot exceed 128 characters. |
| endpoint | string | The address of the Kafka data source. The format is kafka ip:port or kafka ip:port,kafka ip:port,kafka ip:port. |
| enableSSL | boolean | Specifies whether to enable SSL. |
| certSSLId | string | The ID of the trusted certificate file. You can upload a file by calling the upload file API and obtain the file ID. |
| enableSASL | boolean | Specifies whether to enable authentication. |
| saslMechanism | string | The authentication method. Valid values: GSSAPI, PLAIN, SCRAM_SHA_256, and SCRAM_SHA_512. |
| username | string | The username. This parameter is required if the authentication method is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. |
| password | string | The password. This parameter is required if the authentication method is PLAIN, SCRAM_SHA_256, or SCRAM_SHA_512. |
| kdcPath | string | The address of the Key Distribution Center (KDC) server. This parameter is required if the authentication method is GSSAPI. |
| saslKerberosPrincipal | string | The user principal. This parameter is required if the authentication method is GSSAPI. |
| serviceName | string | The sasl.kerberos.service.name parameter of the Kafka server, which specifies the name of the Kerberos service principal. This parameter is required if the authentication method is GSSAPI. |
| certSASLId | string | The ID of the keytab file. You can upload a file by calling the upload file API and obtain the file ID. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the call was successful. |
| errorDetail | object | The error details. |
| code | string | The error code. |
| message | string | The description. |
| advice | string | The suggestion. |
| requestId | string | The request ID. |
| pageNumber | integer | The page number. This parameter takes effect only when you perform a paginated query. |
| pageSize | integer | The page size. This parameter takes effect only when you perform a paginated query. |
| totalCount | integer | The total number of items. This parameter takes effect only when you perform a paginated query. |
| cost | string | The request cost in seconds. |
| data | string | The ID of the Kafka data source. |
Examples
Request example
{
"name": "kafka",
"region": "yangzhou",
"description": "test",
"endpoint": "xxx.xxx.xxx.xxx:9092"
}
Response example
{
"success": true,
"errorDetail": null,
"code": null,
"message": null,
"advice": null,
"requestId": "a7b57****",
"pageNumber": null,
"pageSize": null,
"totalCount": null,
"cost": "1108 ms",
"data": "e_7di****"
}