Get
Returns the specified bus. To get the list of all available buses, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetBusRequest = cloudApi.serverless.eventrouter_bus_service.GetBusRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.BusServiceClient);
const result = await client.get(
GetBusRequest.fromPartial({
busId: "busId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.serverless.eventrouter.v1.bus_service_pb2_grpc import BusServiceStub
from yandex.cloud.serverless.eventrouter.v1.bus_service_pb2 import GetBusRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(BusServiceStub)
response = service.Get(GetBusRequest(bus_id="busId"))
print(response)
GetBusRequest
busId
: string
ID of the bus to get.
Bus
Status
STATUS_UNSPECIFIED
CREATING
ACTIVE
DELETING
id
: string
ID of the bus.
folderId
: string
ID of the folder that the bus belongs to.
cloudId
: string
ID of the cloud that the bus resides in.
createdAt
: google.protobuf.Timestamp
Creation timestamp.
name
: string
Name of the bus.
description
: string
Description of the bus.
labels
: string
Resource labels as key:value
pairs.
deletionProtection
: bool
Deletion protection.
status
: Status
Status of the bus.