Updating a device
Warning
Yandex IoT Core is no longer available to new users.
Current users can create resources until November 1, 2026. Afterwards, the service will go read-only and cease to operate on December 1, 2026. For more information on the timing and procedure, see Service shutdown.
You can update a device name or description.
To access a device, use its unique ID or name. For information on how to get the unique ID or name of a device, see Getting information about a device.
Updating a device name
To update the name of a device:
- In the management console
, select the folder where you want to update the device name. - Navigate
to IoT Core and select the registry of interest. - Navigate to the Devices tab.
- To the right of the device name, click
→ Edit. - Edit the Name field.
- Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
Update the device description:
yc iot device update my-device --new-name test-device
Result:
id: b9135goeh1uc********
registry_id: b91ki3851hab********
created_at: "2019-05-28T16:08:30.938Z"
name: test-device
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the guides on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
To update the name of a device created with Terraform:
-
Open the Terraform configuration file and edit the
nameparameter value in the device description:Here is an example of a device description in the Terraform configuration:
resource "yandex_iot_core_device" "my_device" { registry_id = "<registry_ID>" name = "test-device" description = "test device for terraform provider documentation" ... }For more on the properties of the
yandex_iot_core_deviceresource, see this provider guide. -
In the terminal, navigate to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors detected in the configuration.
-
Apply the configuration changes:
terraform apply -
Confirm the changes: type
yesinto the terminal and press Enter.You can check the updated device name using the management console
or this CLI command:yc iot device list --registry-id <registry_ID>
To update a device name, use the update REST API method for the Device resource or the DeviceService/Update gRPC API call.
Updating a device description
To update a device description:
- In the management console
, select the folder where you want to update the device description. - Navigate
to IoT Core and select the registry of interest. - Navigate to the Devices tab.
- To the right of the device name, click
→ Edit. - Edit the Description field.
- Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
Update the device description:
yc iot device update my-device --description "My first device."
Result:
id: b9135goeh1uc********
registry_id: b91ki3851hab********
created_at: "2019-05-28T16:08:30.938Z"
name: my-device
description: My first device.
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the guides on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
To update the name of a device created with Terraform:
-
Open the Terraform configuration file and edit the
descriptionparameter value in the device description.Here is an example of a device description in the Terraform configuration:
resource "yandex_iot_core_device" "my_device" { registry_id = "<registry_ID>" name = "test-device" description = "test device for terraform provider documentation" ... }For more on the properties of the
yandex_iot_core_deviceresource, see this provider guide. -
In the terminal, navigate to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors detected in the configuration.
-
Apply the configuration changes:
terraform apply -
Confirm the changes: type
yesinto the terminal and press Enter.You can check the updated device description using the management console
or this CLI command:yc iot device get <device_name>
To update a device description, use the update REST API method for the Device resource or the DeviceService/Update gRPC API call.