Get
Returns the specified sink.
To get the list of all available sinks, make a List request.
- TypeScript
- Python
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);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.logging.v1.sink_service_pb2 import GetSinkRequest
from yandex.cloud.logging.v1.sink_service_pb2_grpc import SinkServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(SinkServiceStub)
response = service.Get(GetSinkRequest(sink_id="sinkId"))
print(response)
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
streamName
: string
Fully qualified name of data stream
S3
bucket
: string
Object storage bucket
prefix
: string
Prefix to use for saved log object names