Skip to main content

ListPasswords

Retrieves the list of passwords for the specified device.

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

const ListDevicePasswordsRequest =
cloudApi.iot.devices_device_service.ListDevicePasswordsRequest;

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

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

ListDevicePasswordsRequest

deviceId : string

ID of the registry to list passwords in.

To get a registry ID make a RegistryService.List request.

ListDevicePasswordsResponse

passwords : DevicePassword

List of passwords for the specified device.

DevicePassword

A device password.

deviceId : string

ID of the device that the password belongs to.

id : string

ID of the password.

createdAt : google.protobuf.Timestamp

Creation timestamp.