Skip to main content

Get

Returns the specified sink.

To get the list of all available sinks, make a List request.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const GetSinkRequest = cloudApi.logging.sink_service.GetSinkRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.SinkServiceClient);

const result = await client.get(
GetSinkRequest.fromPartial({
sinkId: "sinkId",
})
);
console.log(result);
})();

GetSinkRequest

sinkId : string

ID of the sink to return.

To get a sink ID make a SinkService.List request.

Sink

Yds

streamName : string

Fully qualified name of data stream

S3

bucket : string

Object storage bucket

prefix : string

Prefix to use for saved log object names

id : string

Sink ID.

folderId : string

Sink folder ID.

cloudId : string

Sink cloud ID.

createdAt : google.protobuf.Timestamp

Sink creation time.

name : string

Sink name.

description : string

Sink description.

labels : string

Sink labels.

serviceAccountId : string

Logs will be written to the sink on behalf of this service account

One of sink

Logs destination

  • yds : Yds

    Yandex data stream

  • s3 : S3

    Object storage

Yds

streamName : string

Fully qualified name of data stream

S3

bucket : string

Object storage bucket

prefix : string

Prefix to use for saved log object names