Skip to main content

Get

Returns the specified broker.

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

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

const GetBrokerRequest = cloudApi.iot.broker_broker_service.GetBrokerRequest;

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

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

GetBrokerRequest

brokerId : string

ID of the broker to return.

To get a broker ID make a BrokerService.List request.

Broker

A broker.

Status

  • STATUS_UNSPECIFIED

  • CREATING

    Broker is being created.

  • ACTIVE

    Broker is ready to use.

  • DELETING

    Broker is being deleted.

id : string

ID of the broker.

folderId : string

ID of the folder that the broker belongs to.

createdAt : google.protobuf.Timestamp

Creation timestamp.

name : string

Name of the broker. The name is unique within the folder.

description : string

Description of the broker. 0-256 characters long.

labels : string

Resource labels as key:value pairs. Maximum of 64 per resource.

status : Status

Status of the broker.

logOptions : LogOptions

Options for logging broker events

LogOptions

disabled : bool

Is logging from broker disabled.

One of destination

Log entries destination.

  • logGroupId : string

    Entry should be written to log group resolved by ID.

  • folderId : string

    Entry should be written to default log group for specified folder.

minLevel : yandex.cloud.logging.v1.LogLevel.Level

Minimum log entry level.

See LogLevel.Level for details.