Skip to content

Namespaced Device and Assets Guide

Paymaun edited this page Jul 14, 2025 · 4 revisions

To create namespace devices and assets, you need to ensure your AIO instance is first using at least version 1.2.30 You can also check with

az iot ops show -n myInstance -g myRg

to see your instance's version and if it has the adrNamespaceRef property.

Once you have checked your instance, you can create your namespace devices and assets!

Note: For all of the commands, the minimum required parameters will be written. Please use -h to see more options.

Namespace Devices

To create a namespace device, use:

az iot ops ns device create -n myDevice --instance myInstance -g myInstanceRg

Note how the resource group is the instance resource group rather than the namespace resource group. We will find the namespace for you!

Once you have created a device, create inbound endpoints. You can choose a specific endpoint type:

  • custom
  • media
  • onvif
  • opcua

To create a ONVIF device inbound endpoint, please use:

az iot ops ns device endpoint inbound add onvif --device myDevice --instance myInstance -g myInstanceRg --name myCustomEndpoint --endpoint-address <valid endpoint address>

You can replace the onvif with one of the other three types to create other types of inbound endpoints. You can include different types within one device.

Namespace Assets

Note: The asset commands will be broken up by type to ensure you can modify the correct properties of assets. You can see which commands are allowed for which types with -h. For example, you can check what is allowed for media with az iot ops ns asset media -h. Also note that the create and type are switched in assets.

image

Once you have your device and inbound endpoint, you can create an asset pointing to that device inbound endpoint.

To create an ONVIF asset, use:

az iot ops ns asset onvif create --name mycustomasset --instance myInstance -g myInstanceRg --device myDevice --endpoint myCustomEndpoint

You can replace onvif with the other types to create other types of assets.

Note: you will need to use the same "asset command type" with respect to your device inbound endpoint. Custom is the only type allowed for all and should be only used for experimental testing. For example, if you created an ONVIF endpoint, you can only use az iot ops ns asset onvif commands (and az iot ops ns asset custom commands for experimental cases). This is to ensure you can set up your asset and device to work together.

Clone this wiki locally