Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
© 2022 ООО «Яндекс.Облако»
Yandex Managed Service for Apache Kafka®
  • Начало работы
  • Пошаговые инструкции
    • Все инструкции
    • Информация об имеющихся кластерах
    • Создание кластера
    • Подключение к кластеру
    • Остановка и запуск кластера
    • Обновление версии Apache Kafka®
    • Изменение настроек кластера
    • Управление хостами Apache Kafka®
    • Работа с топиками и разделами
    • Управление учетными записями Kafka
    • Управление коннекторами
    • Просмотр логов кластера
    • Удаление кластера
    • Мониторинг состояния кластера и хостов
  • Практические руководства
    • Все руководства
    • Поставка данных в Managed Service for ClickHouse
    • Настройка Kafka Connect для работы с Managed Service for Apache Kafka®
    • Поставка данных в ksqlDB
    • Использование схем формата данных с Managed Service for Apache Kafka®
      • Обзор
      • Работа с управляемым реестром схем формата данных
      • Работа с реестром схем формата данных Confluent
    • Миграция данных в Managed Service for Apache Kafka®
    • Поставка данных с помощью Debezium
  • Концепции
    • Взаимосвязь ресурсов сервиса
    • Топики и разделы
    • Брокеры
    • Производители и потребители
    • Управление схемами данных
    • Классы хостов
    • Сеть в Managed Service for Apache Kafka®
    • Квоты и лимиты
    • Типы хранилища
    • Коннекторы
    • Техническое обслуживание
    • Настройки Apache Kafka®
  • Управление доступом
  • Правила тарификации
  • Справочник API
    • Аутентификация в API
    • gRPC (англ.)
      • Overview
      • ClusterService
      • ConnectorService
      • ResourcePresetService
      • TopicService
      • UserService
      • OperationService
    • REST (англ.)
      • Overview
      • Cluster
        • Overview
        • create
        • delete
        • get
        • list
        • listHosts
        • listLogs
        • listOperations
        • move
        • rescheduleMaintenance
        • start
        • stop
        • streamLogs
        • update
      • Connector
        • Overview
        • create
        • delete
        • get
        • list
        • pause
        • resume
        • update
      • ResourcePreset
        • Overview
        • get
        • list
      • Topic
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • User
        • Overview
        • create
        • delete
        • get
        • grantPermission
        • list
        • revokePermission
        • update
      • Operation
        • Overview
        • get
  • История изменений
  • Вопросы и ответы
  1. Справочник API
  2. REST (англ.)
  3. Connector
  4. create

Method create

Статья создана
Yandex.Cloud
  • HTTP request
  • Path parameters
  • Body parameters
  • Response

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 false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

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.

Была ли статья полезна?

Language / Region
© 2022 ООО «Яндекс.Облако»
В этой статье:
  • HTTP request
  • Path parameters
  • Body parameters
  • Response