Getting a list of aliases
To get a list of aliases, you need the unique ID or name of the registry. For information on retrieving the unique registry ID or name, see Getting information about registries.
- In the management console
, select the folder where the device is located. - Go to IoT Core.
- Select the registry where the device is located.
- Navigate to the Devices tab.
- Select the device.
- On the Overview page, go to the Aliases section.
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.
You can only get a list of aliases for all devices in the registry.
Get a list of aliases for all devices in the registry:
yc iot registry list-device-topic-aliases my-registry
Result:
+----------+----------------------------------------+----------------------+
| ALIAS | TOPIC PREFIX | DEVICE ID |
+----------+----------------------------------------+----------------------+
| commands | $devices/arenak5ciqss********/commands | arenak5ciqss******** |
+----------+----------------------------------------+----------------------+
To get a list of device aliases, use the get REST API method for the Device resource or the DeviceService/Get gRPC API call.