Skip to main content

List

Retrieves the list of buses in the specified folder.

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

const ListBusesRequest =
cloudApi.serverless.eventrouter_bus_service.ListBusesRequest;

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

const result = await client.list(
ListBusesRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();

ListBusesRequest

folderId : string

ID of the folder to list buses in.

pageSize : int64

Maximum number of buses to return.

pageToken : string

Page token. To get the next page of results, set page_token to the ListBusesResponse.next_page_token returned by a previous list request.

filter : string

Supported fields for filter: name created_at

ListBusesResponse

buses : Bus

List of buses.

nextPageToken : string

Token for getting the next page of the list of buses.

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.