Skip to main content

ListPasswords

Retrieves the list of passwords for the specified broker.

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

const ListBrokerPasswordsRequest =
cloudApi.iot.broker_broker_service.ListBrokerPasswordsRequest;

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

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

ListBrokerPasswordsRequest

brokerId : string

ID of the broker to list passwords in.

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

ListBrokerPasswordsResponse

passwords : BrokerPassword

List of passwords for the specified broker.

BrokerPassword

A broker password.

brokerId : string

ID of the broker that the password belongs to.

id : string

ID of the password.

createdAt : google.protobuf.Timestamp

Creation timestamp.