I am trying to automate the process of device creation in azure IOT Hub. Not able to find the code in ARM templet. Can anyone help me on it?
Asked
Active
Viewed 160 times
2 Answers
1
You can't register devices through ARM API. The IoTHub Rest API documentation can be found here.
You can also use the az iot device registration create
command to register device:
# Register an IoT device using an individual enrollment.
az iot device registration create -n {dps_name} --rid {registration_id}
# Register an IoT device using a group enrollment.
az iot device registration create -n {dps_name} --rid {registration_id} --gid {group_enrollment_id}

Thomas
- 24,234
- 6
- 81
- 125
0
There is no ARM template for device creation. This is because ARM usually covers Azure resources and not the data plane of those resources. You can still automate device creation, the Azure CLI is an excellent way of doing that!
You can use the az iot device-identity create
command to create a new device.

Matthijs van der Veer
- 3,865
- 2
- 12
- 22