Updating a registry
You can edit a registry name or description and manage registry labels.
To access a registry, use its unique ID or name. For information about how to find the unique ID or name, see Getting information about registries.
Updating the name of a registry
To update the name of a registry:
- In the management console
, select the folder to update the registry name in. - Select IoT Core.
- To the right of the registry name, click the
icon and select Edit from the drop-down list. - Edit the Name field.
- Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
Change the registry name:
yc iot registry update my-registry --new-name test-registry
Result:
id: b91ki3851hab********
folder_id: aoek49ghmknn********
created_at: "2019-05-28T11:29:42.420Z"
name: test-registry
Terraform
For more information about the provider resources, see the documentation on the Terraform
If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.
If you don't have Terraform, install it and configure the Yandex Cloud provider.
To update the name of a registry created using Terraform:
-
Open the Terraform configuration file and edit the value of the
name
parameter in the fragment with the device description.Example registry description in the Terraform configuration:
resource "yandex_iot_core_registry" "my_registry" { name = "test-registry" description = "test registry for terraform provider documentation" } ... }
For more information about the
yandex_iot_core_registry
parameters in Terraform, see the relevant provider documentation . -
In the command line, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validate
If the configuration is correct, you will get this message:
Success! The configuration is valid.
-
Run this command:
terraform plan
The terminal will display a list of resources with parameters. No changes will be made at this step. If the configuration contains any errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
into the terminal and click Enter.You can verify the updated registry name in the management console
or using the following CLI command:yc iot registry list
To rename a registry, use the update REST API method for the Registry resource or the RegistryService/Update gRPC API call.
Updating the description of a registry
To update the description of a registry:
- In the management console
, select the folder to update the registry description in. - Select IoT Core.
- To the right of the registry name, click the
icon and select Edit from the drop-down list. - Edit the Description field.
- Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
Change the registry description:
yc iot registry update my-registry --description "My test registry."
Result:
id: b91ki3851hab********
folder_id: aoek49ghmknn********
created_at: "2019-05-28T11:29:42.420Z"
name: my-registry
description: My test registry.
labels:
test_label: my_registry_label
Terraform
For more information about the provider resources, see the documentation on the Terraform
If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.
If you don't have Terraform, install it and configure the Yandex Cloud provider.
To update the description of a registry created using Terraform:
-
Open the Terraform configuration file and edit the value of the
description
parameter in the fragment with the device description.Example registry description in the Terraform configuration:
resource "yandex_iot_core_registry" "my_registry" { name = "test-registry" description = "test registry for terraform provider documentation" } ... }
For more information about the
yandex_iot_core_registry
parameters in Terraform, see the relevant provider documentation . -
In the command line, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validate
If the configuration is correct, you will get this message:
Success! The configuration is valid.
-
Run this command:
terraform plan
The terminal will display a list of resources with parameters. No changes will be made at this step. If the configuration contains any errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
into the terminal and click Enter.You can verify the updated registry description in the management console
or using the following CLI command:yc iot registry get <registry_name>
To update a registry description, use the update REST API method for the Registry resource or the RegistryService/Update gRPC API call.
Managing registry labels
You can perform the following actions related to registry labels:
Adding a label
To add a registry label:
- In the management console
, select the folder to add the registry label to. - Select IoT Core.
- To the right of the registry name, click the
icon and select Edit from the drop-down list. - Fill in the Key and Value fields and click Add label.
- Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
Add a label to a registry:
yc iot registry add-labels my-registry --labels new_label=test_label
Result:
id: b91ki3851hab********
folder_id: aoek49ghmknn********
created_at: "2019-05-28T11:29:42.420Z"
name: my-registry
labels:
new_label: test_label
Terraform
For more information about the provider resources, see the documentation on the Terraform
If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.
If you don't have Terraform, install it and configure the Yandex Cloud provider.
To add a label to a registry created using Terraform:
-
In the configuration file, describe the parameters of the resource to create:
yandex_iot_core_registry
: Registry parameters:name
: Registry name.description
: Registry description.labels
: Registry labels inkey:value
format.
Here is an example of the resource structure in the configuration file:
resource "yandex_iot_core_registry" "my_registry" { name = "test-registry" description = "test registry for terraform provider documentation" labels = { new-label = "test-label" } ... }
For more information about the
yandex_iot_core_registry
parameters in Terraform, see the relevant provider documentation . -
In the command line, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validate
If the configuration is correct, you will get this message:
Success! The configuration is valid.
-
Run this command:
terraform plan
The terminal will display a list of resources with parameters. No changes will be made at this step. If the configuration contains any errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
into the terminal and click Enter.You can verify registry labels using the following CLI command:
yc iot registry get <registry_name>
To add a label to a registry, use the update REST API method for the Registry resource or the RegistryService/Update gRPC API call.
Updating a label
To update the label of a registry:
- In the management console
, select the folder to update the registry label in. - Select IoT Core.
- To the right of the registry name, click the
icon and select Edit from the drop-down list. - Edit the Key and Value fields.
- Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
Change a registry label:
Warning
The existing set of labels
is completely overwritten by the one transmitted in the request.
yc iot registry update my-registry --labels test_label=my_registry_label
Result:
id: b91ki3851hab********
folder_id: aoek49ghmknn********
created_at: "2019-05-28T11:29:42.420Z"
name: my-registry
labels:
test_label: my_registry_label
Terraform
For more information about the provider resources, see the documentation on the Terraform
If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.
If you don't have Terraform, install it and configure the Yandex Cloud provider.
To update the label of a registry created using Terraform:
-
Open the Terraform configuration file and update the label value in the
labels
section, in the fragment with the registry description.Example registry description in the Terraform configuration:
resource "yandex_iot_core_registry" "my_registry" { name = "test-registry" description = "test registry for terraform provider documentation" labels = { test-label = "my-registry-label" } ... }
For more information about the
yandex_iot_core_registry
parameters in Terraform, see the relevant provider documentation . -
In the command line, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validate
If the configuration is correct, you will get this message:
Success! The configuration is valid.
-
Run this command:
terraform plan
The terminal will display a list of resources with parameters. No changes will be made at this step. If the configuration contains any errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
into the terminal and click Enter.You can verify registry labels using the following CLI command:
yc iot registry get <registry_name>
To update a registry label, use the update REST API method for the Registry resource or the RegistryService/Update gRPC API call.
Deleting a label
To delete a registry label:
- In the management console
, select the folder to delete the registry label from. - Select IoT Core.
- To the right of the registry name, click the
icon and select Edit from the drop-down list. - To the right of the label to delete, click
. - Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
Delete a registry label:
yc iot registry remove-labels my-registry --labels new_label
Result:
id: b91ki3851hab********
folder_id: aoek49ghmknn********
created_at: "2019-05-28T11:29:42.420Z"
name: my-registry
Terraform
For more information about the provider resources, see the documentation on the Terraform
If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.
If you don't have Terraform, install it and configure the Yandex Cloud provider.
To delete the label of a registry created using Terraform:
-
Open the Terraform configuration file and delete the value of the label in the
labels
section, in the fragment with the registry description. To delete all labels, delete the entirelabels
section.Example registry description in the Terraform configuration:
resource "yandex_iot_core_registry" "my_registry" { name = "test-registry" description = "test registry for terraform provider documentation" labels = { test-label = "my-registry-label" } ... }
For more information about the
yandex_iot_core_registry
parameters in Terraform, see the relevant provider documentation . -
In the command line, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validate
If the configuration is correct, you will get this message:
Success! The configuration is valid.
-
Run this command:
terraform plan
The terminal will display a list of resources with parameters. No changes will be made at this step. If the configuration contains any errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
into the terminal and click Enter.You can verify registry labels using the following CLI command:
yc iot registry get <registry_name>
To delete a registry label, use the update REST API method for the Registry resource or the RegistryService/Update gRPC API call.