Managed Service for Apache Kafka® API, REST: Connector.create
Creates a new Apache Kafka® connector in a cluster.
HTTP request
POST https://mdb.api.cloud.yandex.net/managed-kafka/v1/clusters/{clusterId}/connectors
Path parameters
Parameter | Description |
---|---|
clusterId | Required. ID of the Apache Kafka® cluster to create the connector in. To get this ID, make a list request. The maximum string length in characters is 50. |
Body parameters
{
"connectorSpec": {
"name": "string",
"tasksMax": "integer",
"properties": "object",
// `connectorSpec` includes only one of the fields `connectorConfigMirrormaker`, `connectorConfigS3Sink`
"connectorConfigMirrormaker": {
"sourceCluster": {
"alias": "string",
// `connectorSpec.connectorConfigMirrormaker.sourceCluster` includes only one of the fields `thisCluster`, `externalCluster`
"thisCluster": {},
"externalCluster": {
"bootstrapServers": "string",
"saslUsername": "string",
"saslPassword": "string",
"saslMechanism": "string",
"securityProtocol": "string",
"sslTruststoreCertificates": "string"
},
// end of the list of possible fields`connectorSpec.connectorConfigMirrormaker.sourceCluster`
},
"targetCluster": {
"alias": "string",
// `connectorSpec.connectorConfigMirrormaker.targetCluster` includes only one of the fields `thisCluster`, `externalCluster`
"thisCluster": {},
"externalCluster": {
"bootstrapServers": "string",
"saslUsername": "string",
"saslPassword": "string",
"saslMechanism": "string",
"securityProtocol": "string",
"sslTruststoreCertificates": "string"
},
// end of the list of possible fields`connectorSpec.connectorConfigMirrormaker.targetCluster`
},
"topics": "string",
"replicationFactor": "integer"
},
"connectorConfigS3Sink": {
"topics": "string",
"fileCompressionType": "string",
"fileMaxRecords": "integer",
"s3Connection": {
"bucketName": "string",
"externalS3": {
"accessKeyId": "string",
"secretAccessKey": "string",
"endpoint": "string",
"region": "string"
}
}
},
// end of the list of possible fields`connectorSpec`
}
}
Field | Description |
---|---|
connectorSpec | object Required. Configuration of the connector to create. An object that represents an Apache Kafka® connector. See the documentation for details. |
connectorSpec. name |
string Name of the connector. |
connectorSpec. tasksMax |
integer (int64) Maximum number of connector tasks. Default value is the number of brokers. |
connectorSpec. properties |
object A set of properties passed to Managed Service for Apache Kafka® with the connector configuration. Example: |
connectorSpec. connectorConfigMirrormaker |
object Configuration of the MirrorMaker connector. connectorSpec includes only one of the fields connectorConfigMirrormaker , connectorConfigS3Sink |
connectorSpec. connectorConfigMirrormaker. sourceCluster |
object Source cluster configuration for the MirrorMaker connector. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. alias |
string Alias of cluster connection configuration. Examples: |
connectorSpec. connectorConfigMirrormaker. sourceCluster. thisCluster |
object Connection configuration of the cluster the connector belongs to. As all credentials are already known, leave this parameter empty. connectorSpec.connectorConfigMirrormaker.sourceCluster includes only one of the fields thisCluster , externalCluster |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster |
object Configuration of connection to an external cluster with all the necessary credentials. connectorSpec.connectorConfigMirrormaker.sourceCluster includes only one of the fields thisCluster , externalCluster |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. bootstrapServers |
string List of bootstrap servers of the cluster, separated by |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. saslUsername |
string SASL username to use for connection to the cluster. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. saslPassword |
string SASL password to use for connection to the cluster. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. saslMechanism |
string SASL mechanism to use for connection to the cluster. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. securityProtocol |
string Security protocol to use for connection to the cluster. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. sslTruststoreCertificates |
string CA in PEM format to connect to external cluster. Lines of certificate separated by '\n' symbol. |
connectorSpec. connectorConfigMirrormaker. targetCluster |
object Target cluster configuration for the MirrorMaker connector. |
connectorSpec. connectorConfigMirrormaker. targetCluster. alias |
string Alias of cluster connection configuration. Examples: |
connectorSpec. connectorConfigMirrormaker. targetCluster. thisCluster |
object Connection configuration of the cluster the connector belongs to. As all credentials are already known, leave this parameter empty. connectorSpec.connectorConfigMirrormaker.targetCluster includes only one of the fields thisCluster , externalCluster |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster |
object Configuration of connection to an external cluster with all the necessary credentials. connectorSpec.connectorConfigMirrormaker.targetCluster includes only one of the fields thisCluster , externalCluster |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. bootstrapServers |
string List of bootstrap servers of the cluster, separated by |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. saslUsername |
string SASL username to use for connection to the cluster. |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. saslPassword |
string SASL password to use for connection to the cluster. |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. saslMechanism |
string SASL mechanism to use for connection to the cluster. |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. securityProtocol |
string Security protocol to use for connection to the cluster. |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. sslTruststoreCertificates |
string CA in PEM format to connect to external cluster. Lines of certificate separated by '\n' symbol. |
connectorSpec. connectorConfigMirrormaker. topics |
string List of Kafka topics, separated by |
connectorSpec. connectorConfigMirrormaker. replicationFactor |
integer (int64) Replication factor for automatically created topics. |
connectorSpec. connectorConfigS3Sink |
object Configuration of S3-Sink connector. connectorSpec includes only one of the fields connectorConfigMirrormaker , connectorConfigS3Sink |
connectorSpec. connectorConfigS3Sink. topics |
string List of Kafka topics, separated by ','. |
connectorSpec. connectorConfigS3Sink. fileCompressionType |
string The compression type used for files put on GCS. The supported values are: |
connectorSpec. connectorConfigS3Sink. fileMaxRecords |
integer (int64) Max records per file. |
connectorSpec. connectorConfigS3Sink. s3Connection |
object Credentials for connecting to S3 storage. Specification for S3Connection - settings of connection to AWS-compatible S3 storage, that are source or target of Kafka S3-connectors. YC Object Storage is AWS-compatible. |
connectorSpec. connectorConfigS3Sink. s3Connection. bucketName |
string |
connectorSpec. connectorConfigS3Sink. s3Connection. externalS3 |
object |
connectorSpec. connectorConfigS3Sink. s3Connection. externalS3. accessKeyId |
string |
connectorSpec. connectorConfigS3Sink. s3Connection. externalS3. secretAccessKey |
string |
connectorSpec. connectorConfigS3Sink. s3Connection. externalS3. endpoint |
string |
connectorSpec. connectorConfigS3Sink. s3Connection. externalS3. region |
string Default is 'us-east-1'. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": true,
"metadata": "object",
// includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object",
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
createdAt | string (date-time) Creation timestamp. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
createdBy | string ID of the user or service account who initiated the operation. |
modifiedAt | string (date-time) The time when the Operation resource was last modified. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
done | boolean (boolean) If the value is |
metadata | object Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
error | object The error result of the operation in case of failure or cancellation. includes only one of the fields error , response |
error. code |
integer (int32) Error code. An enum value of google.rpc.Code. |
error. message |
string An error message. |
error. details[] |
object A list of messages that carry the error details. |
response | object includes only one of the fields error , response The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any. |