List
Retrieves the list of connectors in the specified folder.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListConnectorsRequest =
cloudApi.mdb.kafka_connector_service.ListConnectorsRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ConnectorServiceClient);
const result = await client.list(
ListConnectorsRequest.fromPartial({
clusterId: "clusterId",
// pageSize: 0,
// pageToken: "pageToken"
})
);
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 ListConnectorsRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ConnectorServiceStub)
response = service.List(
ListConnectorsRequest(
cluster_id="clusterId",
# page_size = 0,
# page_token = "pageToken"
)
)
print(response)
ListConnectorsRequest
One of containerId
ID of the folder or bus to list connectors in.
busId: stringID of the bus to list connectors in.
folderId: stringID of the folder to list connectors in.
pageSize : int64
The maximum number of results per response.
pageToken : string
Page token. To get the next page of results, set page_token to the
next_page_token returned by a previous list request.
filter : string
Supported fields for filter: name created_at
ListConnectorsResponse
connectors : Connector
List of connectors.
nextPageToken : string
Token for getting the next page of the list of results.
Connector
Status
Status of the connector.
STATUS_UNSPECIFIEDStatus of the connector.
RUNNINGStatus of the connector.
STOPPEDdisabled by user
RESOURCE_NOT_FOUNDsource does not exist
PERMISSION_DENIEDservice account does not have read permission on source
SUBJECT_NOT_FOUNDservice account not found
id : string
ID of the connector.
busId : string
ID of the bus that the connector belongs to.
folderId : string
ID of the folder that the connector resides in.
cloudId : string
ID of the cloud that the connector resides in.
createdAt : google.protobuf.Timestamp
Creation timestamp.
name : string
Name of the connector.
description : string
Description of the connector.
labels : string
Resource labels as key:value pairs.
source : Source
Source of the connector.
deletionProtection : bool
Deletion protection.
status : Status
Status of the connector.
Source
One of source
dataStream: DataStream
messageQueue: MessageQueue
DataStream
database : string
Stream database. example: /ru-central1/aoegtvhtp8ob****/cc8004q4lbo6****
streamName : string
Stream name, absolute or relative.
consumer : string
Consumer name.
serviceAccountId : string
Service account which has read permission on the stream.
MessageQueue
queueArn : string
Queue ARN. Example: yrn:yc:ymq:ru-central1:aoe***:test
serviceAccountId : string
Service account which has read access to the queue.
visibilityTimeout : google.protobuf.Duration
Queue visibility timeout override.
batchSize : int64
Batch size for polling.
pollingTimeout : google.protobuf.Duration
Queue polling timeout.