ListPasswords
Retrieves the list of passwords for the specified registry.
- TypeScript
- Python
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);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.iot.devices.v1.registry_service_pb2 import ListRegistryPasswordsRequest
from yandex.cloud.containerregistry.v1.registry_service_pb2_grpc import RegistryServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(RegistryServiceStub)
response = service.ListPasswords(ListRegistryPasswordsRequest(registry_id="registryId"))
print(response)
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.