GetByName
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetByNameRegistryRequest =
cloudApi.iot.devices_registry_service.GetByNameRegistryRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.RegistryServiceClient);
const result = await client.getByName(
GetByNameRegistryRequest.fromPartial({
folderId: "folderId",
registryName: "registryName",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.iot.devices.v1.registry_service_pb2 import GetByNameRegistryRequest
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.GetByName(
GetByNameRegistryRequest(folder_id="folderId", registry_name="registryName")
)
print(response)
GetByNameRegistryRequest
folderId
: string
ID of the folder to list registries in.
To get a folder ID make a yandex.cloud.resourcemanager.v1.FolderService.List request.
registryName
: string
Name of the registry to return.
To get a registry Name make a RegistryService.List request.
Registry
A registry. For more information, see Registry.
Status
STATUS_UNSPECIFIED
CREATING
Registry is being created.
ACTIVE
Registry is ready to use.
DELETING
Registry is being deleted.
DISABLED
Registry is disabled.
id
: string
ID of the registry.
folderId
: string
ID of the folder that the registry belongs to.
createdAt
: google.protobuf.Timestamp
Creation timestamp.
name
: string
Name of the registry. The name is unique within the folder.
description
: string
Description of the registry. 0-256 characters long.
labels
: string
Resource labels as key:value
pairs. Maximum of 64 per resource.
status
: Status
Status of the registry.
logGroupId
: string
ID of the logs group for the specified registry.
logOptions
: LogOptions
Options for logging registry events
LogOptions
disabled
: bool
Is logging from registry disabled.
One of destination
Log entries destination.
logGroupId
: stringEntry should be written to log group resolved by ID.
folderId
: stringEntry 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.