Get
Returns information about an Apache Kafka® connector.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetConnectorRequest =
cloudApi.mdb.kafka_connector_service.GetConnectorRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ConnectorServiceClient);
const result = await client.get(
GetConnectorRequest.fromPartial({
clusterId: "clusterId",
connectorName: "connectorName",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.mdb.kafka.v1.connector_service_pb2_grpc import ConnectorServiceStub
from yandex.cloud.mdb.kafka.v1.connector_service_pb2 import GetConnectorRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ConnectorServiceStub)
response = service.Get(GetConnectorRequest(cluster_id="clusterId", connector_name="connectorName"))
print(response)
GetConnectorRequest
clusterId
: string
ID of the Apache Kafka® cluster the connector belongs to.
To get this ID, make a ClusterService.List request.
connectorName
: string
Name of the Apache Kafka® connector to return information about.
To get this name, make a ConnectorService.List request.
Connector
Health
HEALTH_UNKNOWN
Health of the connector is unknown.
ALIVE
Connector is running.
DEAD
Connector has failed to start.
Status
STATUS_UNKNOWN
Connector state is unknown.
RUNNING
Connector is running normally.
ERROR
Connector has encountered a problem and cannot operate.
PAUSED
Connector is paused.
name
: string
Name of the connector.
tasksMax
: google.protobuf.Int64Value
Maximum number of connector tasks. Default value is the number of brokers.
properties
: string
A set of properties passed to Managed Service for Apache Kafka® with the connector configuration.
Example: sync.topics.config.enabled: true
.
health
: Health
Connector health.
status
: Status
Current status of the connector.
clusterId
: string
ID of the Apache Kafka® cluster that the connector belongs to.
One of connectorConfig
Additional settings for the connector.
connectorConfigMirrormaker
: ConnectorConfigMirrorMakerConfiguration of the MirrorMaker connector.
connectorConfigS3Sink
: ConnectorConfigS3SinkConfiguration of S3-Sink connector.
ConnectorConfigMirrorMaker
sourceCluster
: ClusterConnection
Source cluster connection configuration.
targetCluster
: ClusterConnection
Target cluster connection configuration.
topics
: string
List of Kafka topics, separated by ,
.
replicationFactor
: google.protobuf.Int64Value
Replication factor for automatically created topics.
ConnectorConfigS3Sink
An Apache Kafka® S3-Sink connector resource.
topics
: string
List of Kafka topics, separated by ','.
fileCompressionType
: string
The compression type used for files put on GCS.
The supported values are: gzip
, snappy
, zstd
, none
.
Optional, the default is none
.
fileMaxRecords
: google.protobuf.Int64Value
Max records per file.
s3Connection
: S3Connection
Credentials for connecting to S3 storage.
ClusterConnection
alias
: string
Alias of cluster connection configuration.
Examples: source
, target
.
One of clusterConnection
Type of connection to Apache Kafka® cluster.
thisCluster
: ThisClusterConnection configuration of the cluster the connector belongs to. As all credentials are already known, leave this parameter empty.
externalCluster
: ExternalClusterConnectionConfiguration of connection to an external cluster with all the necessary credentials.
S3Connection
Resource 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.
bucketName
: string
One of storage
externalS3
: ExternalS3Storage
ThisCluster
ExternalClusterConnection
bootstrapServers
: string
List of bootstrap servers of the cluster, separated by ,
.
saslUsername
: string
SASL username to use for connection to the cluster.
saslMechanism
: string
SASL mechanism to use for connection to the cluster.
securityProtocol
: string
Security protocol to use for connection to the cluster.
ExternalS3Storage
accessKeyId
: string
endpoint
: string
region
: string
Default is 'us-east-1'