Deleting an alias
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.
Aliases are associated with specific devices. To delete an alias, you need to get the device ID or name.
To delete an alias:
- In the management console
, select the folder where you want to delete an alias. - Navigate
to IoT Core and select the registry of interest. - Navigate to the Devices tab.
- To the right of the device name, click
→ Edit. - Under Aliases, click
to the right of the alias you want to delete. - Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.
If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
Delete an alias:
yc iot device remove-topic-aliases arenak5ciqss******** --topic-aliases commands
Result:
id: arenak5ciqss********
registry_id: arenou2oj4ct********
created_at: "2019-09-16T12:32:48.911Z"
name: second
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 delete an alias created with Terraform:
-
Open the Terraform configuration file and delete the alias value from the
aliasessection of the device description. To remove all aliases, delete the entirealiasessection.Here is an example of a device description in the Terraform configuration:
resource "yandex_iot_core_device" "my_device" { registry_id = "<registry_ID>" name = "<device_name>" description = "test device for terraform provider documentation" aliases = { "some-alias1/subtopic" = "$devices/{id}/events/somesubtopic", "some-alias2/subtopic" = "$devices/{id}/events/aaa/bbb", } ... }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 device aliases using the management console
or this CLI command:yc iot device get <device_name>