Skip to main content

ListPasswords

Retrieves the list of passwords for the specified registry.

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

const ListRegistryPasswordsRequest =
cloudApi.iot.devices_registry_service.ListRegistryPasswordsRequest;

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

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

ListRegistryPasswordsRequest

registryId : string

ID of the registry to list passwords in.

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

ListRegistryPasswordsResponse

passwords : RegistryPassword

List of passwords for the specified registry.

RegistryPassword

A registry password.

registryId : string

ID of the registry that the password belongs to.

id : string

ID of the password.

createdAt : google.protobuf.Timestamp

Creation timestamp.