Getting information about registries
To find out the unique ID or name of a registry, get a list of registries in a folder.
Getting a list of registries in a folder
- In the management console
, select the folder where you want to get a list of registries. - Select IoT Core.
- The Registries page will show the list of registries.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
View the description of the CLI command to get a list of registries:
yc iot registry list --help -
Get a list of registries in the default folder:
yc iot registry listResult:
+----------------------+-------------+ | ID | NAME | +----------------------+-------------+ | b91ki3851hab******** | my-registry | +----------------------+-------------+
To get a list of registries, use the list REST API method for the Registry resource or the RegistryService/List gRPC API call.
Getting detailed information about a registry
To access a registry, use the unique ID or name of the registry from the previous step.
- In the management console
, select the folder where the registry is located. - Select IoT Core.
- Select the registry.
- The Overview page will show the registry details.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
View the description of the CLI command to get information about the registry:
yc iot registry get --help -
Get detailed information about the registry by specifying its name or ID:
yc iot registry get <registry_name>Result:
id: b91ki3851hab******** folder_id: aoek49ghmknn******** created_at: "2019-05-28T11:29:42.420Z" name: my-registry
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the relevant documentation on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To get detailed information about a registry using Terraform:
-
Add the
dataandoutputsections to the Terraform configuration file:data "yandex_iot_core_registry" "my_registry" { registry_id = "<registry_ID>" } output "registry_params" { value = data.yandex_iot_core_registry.my_registry.created_at }Where:
data "yandex_iot_core_registry": Description of the registry as a data source:registry_id: Registry ID.
output "registry_params": Output variable that contains information about the registry creation timestamp:value: Returned value.
You can replace
created_atwith any other parameter to get the information you need. For more information about theyandex_iot_core_registrydata source parameters, see the relevant provider documentation. -
Create resources:
-
In the terminal, go to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is correct, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a detailed list of resources. No changes will be made at this step. If the configuration contains any errors, Terraform will show them.
-
Apply the changes:
terraform apply -
Type
yesand press Enter to confirm the changes.
Terraform will create the required resources and display the output variable values in the terminal. To check the results, run:
terraform outputResult:
registry_params = "2024-05-08T06:40:52Z" -
To get detailed information about a registry, use the get REST API method for the Registry resource or the RegistryService/Get gRPC API call.