Method create
Creates a new Apache Kafka connector in the specified cluster.
HTTP request
POST https://mdb.api.cloud.yandex.net/managed-kafka/v1/clusters/{clusterId}/connectors
Path parameters
Parameter | Description |
---|---|
clusterId | Required. Required. ID of the Apache Kafka cluster to create a connector in. To get the cluster ID use a list request. The maximum string length in characters is 50. |
Body parameters
{
"connectorSpec": {
"name": "string",
"tasksMax": "integer",
"properties": "object",
"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"
}
}
}
Field | Description |
---|---|
connectorSpec | object Required. Required. Configuration of the connector to create. An Apache Kafka® connector specification |
connectorSpec. name |
string Name of the connector. |
connectorSpec. tasksMax |
integer (int64) Maximum number of connector tasks. Default is the number of brokers. |
connectorSpec. properties |
object Properties passed with connector config to Connect service. Example: 'sync.topics.config.enabled: true'. |
connectorSpec. connectorConfigMirrormaker |
object Configuration of MirrorMaker connector An An Apache Kafka® MirrorMaker connector specification. |
connectorSpec. connectorConfigMirrormaker. sourceCluster |
object Source cluster configuration. Specification of ClusterConnection - connection to clusters, that are source or target of MirrorMaker clusters. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. alias |
string Alias of ClusterConnection. For example: 'source', 'target', ... |
connectorSpec. connectorConfigMirrormaker. sourceCluster. thisCluster |
object If type is 'this_cluster' - we connect to cluster that is handle Kafka Connect Worker, on which we try to register connector. connectorSpec.connectorConfigMirrormaker.sourceCluster includes only one of the fields thisCluster , externalCluster Specification of cluster_connection type 'this_cluster'. This means that we already have all credentials, so this spec is empty. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster |
object If type is 'external_cluster' - we connect to cluster that is not handle Kafka Connect Worker, on which we try to register connector. connectorSpec.connectorConfigMirrormaker.sourceCluster includes only one of the fields thisCluster , externalCluster Specification of connection to external cluster. It contains all necessary credentials to connect to external cluster. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. bootstrapServers |
string List bootstrap servers of cluster, separated by ','. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. saslUsername |
string Sasl username which we use to connect to cluster. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. saslPassword |
string Sasl password which we use to connect to cluster. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. saslMechanism |
string Sasl mechanism, which we should use to connect to cluster. |
connectorSpec. connectorConfigMirrormaker. sourceCluster. externalCluster. securityProtocol |
string Security protocol, which we should use to connect to 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. Specification of ClusterConnection - connection to clusters, that are source or target of MirrorMaker clusters. |
connectorSpec. connectorConfigMirrormaker. targetCluster. alias |
string Alias of ClusterConnection. For example: 'source', 'target', ... |
connectorSpec. connectorConfigMirrormaker. targetCluster. thisCluster |
object If type is 'this_cluster' - we connect to cluster that is handle Kafka Connect Worker, on which we try to register connector. connectorSpec.connectorConfigMirrormaker.targetCluster includes only one of the fields thisCluster , externalCluster Specification of cluster_connection type 'this_cluster'. This means that we already have all credentials, so this spec is empty. |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster |
object If type is 'external_cluster' - we connect to cluster that is not handle Kafka Connect Worker, on which we try to register connector. connectorSpec.connectorConfigMirrormaker.targetCluster includes only one of the fields thisCluster , externalCluster Specification of connection to external cluster. It contains all necessary credentials to connect to external cluster. |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. bootstrapServers |
string List bootstrap servers of cluster, separated by ','. |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. saslUsername |
string Sasl username which we use to connect to cluster. |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. saslPassword |
string Sasl password which we use to connect to cluster. |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. saslMechanism |
string Sasl mechanism, which we should use to connect to cluster. |
connectorSpec. connectorConfigMirrormaker. targetCluster. externalCluster. securityProtocol |
string Security protocol, which we should use to connect to 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. |
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. |
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. |
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 The error result of the operation in case of failure or cancellation. |
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. |