Skip to main content

Get

Returns the specified bus. To get the list of all available buses, make a List request.

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);
})();

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.