Updating a registry
You can edit a registry name or description and manage registry labels.
To access a registry, use its ID or name. For information about how to get the registry 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
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
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the documentation on the Terraform
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
name
parameter value in the registry description fragment.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
resource 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 press 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
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
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the documentation on the Terraform
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
description
parameter value in the registry description fragment.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
resource 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 press 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
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
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the documentation on the Terraform
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
resource 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 press 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
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 labels
will be completely overwritten by the ones you provide in your 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
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the documentation on the Terraform
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 edit the label value in the
labels
section, in the registry description fragment.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
resource 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 press 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
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
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the documentation on the Terraform
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 label value in the
labels
section, in the registry description fragment. 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
resource 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 press 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.