az iot central device
Manage and configure IoT Central devices.
Commands
az iot central device command |
Run device commands. |
az iot central device command history |
Get most recent command-response request and response payload. |
az iot central device command run |
Run a command on a device and view associated response. Does NOT monitor property updates that the command may perform. |
az iot central device compute-device-key |
Generate a derived device SAS key. |
az iot central device create |
Create a device in IoT Central. |
az iot central device delete |
Delete a device from IoT Central. |
az iot central device registration-info |
Get registration info on device(s) from IoT Central. |
az iot central device show |
Get a device from IoT Central. |
az iot central device show-credentials |
Get device credentials from IoT Central. |
az iot central device twin |
Manage IoT Central device twins. |
az iot central device twin show |
Get the device twin from IoT Hub. |
az iot central device compute-device-key
Generate a derived device SAS key.
Generate a derived device key from a group-level SAS key.
az iot central device compute-device-key --device-id
--pk
Examples
Basic usage
az iot central device compute-device-key --pk {primaryKey} --device-id {deviceid}
Required Parameters
Target Device.
The primary symmetric shared access key stored in base64 format.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device create
Create a device in IoT Central.
az iot central device create --app-id
--device-id
[--central-api-uri]
[--device-name]
[--instance-of]
[--simulated {false, true}]
[--token]
Examples
Create a device
az iot central device create --app-id {appid} --device-id {deviceid}
Create a simulated device
az iot central device create --app-id {appid} --device-id {deviceid} --instance-of {devicetemplateid} --simulated
Required Parameters
Target App.
Target Device.
Optional Parameters
Central dns suffix. This enables running cli commands against non public/prod environments.
Human readable device name. Example: Fridge.
Central template id. Example: urn:ojpkindbz:modelDefinition:iild3tm_uo.
Add this flag if you would like IoT Central to set this up as a simulated device. --instance-of is required if this is true.
Authorization token for request. More info available here: https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/ MUST INCLUDE type (e.g. 'SharedAccessToken ...', 'Bearer ...'). Example: 'Bearer someBearerTokenHere'.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device delete
Delete a device from IoT Central.
az iot central device delete --app-id
--device-id
[--central-api-uri]
[--token]
Examples
Delete a device
az iot central device delete --app-id {appid} --device-id {deviceid}
Required Parameters
Target App.
Target Device.
Optional Parameters
Central dns suffix. This enables running cli commands against non public/prod environments.
Authorization token for request. More info available here: https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/ MUST INCLUDE type (e.g. 'SharedAccessToken ...', 'Bearer ...'). Example: 'Bearer someBearerTokenHere'.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device registration-info
Get registration info on device(s) from IoT Central.
Note: This command can take a significant amount of time to return if no device id is specified and your app contains a lot of devices.
az iot central device registration-info --app-id
--device-id
[--central-api-uri]
[--token]
Examples
Get registration info on specified device
az iot central device registration-info --app-id {appid} --device-id {deviceid}
Required Parameters
Target App.
Target Device.
Optional Parameters
Central dns suffix. This enables running cli commands against non public/prod environments.
Authorization token for request. More info available here: https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/ MUST INCLUDE type (e.g. 'SharedAccessToken ...', 'Bearer ...'). Example: 'Bearer someBearerTokenHere'.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device show
Get a device from IoT Central.
az iot central device show --app-id
--device-id
[--central-api-uri]
[--token]
Examples
Get a device
az iot central device show --app-id {appid} --device-id {deviceid}
Required Parameters
Target App.
Target Device.
Optional Parameters
Central dns suffix. This enables running cli commands against non public/prod environments.
Authorization token for request. More info available here: https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/ MUST INCLUDE type (e.g. 'SharedAccessToken ...', 'Bearer ...'). Example: 'Bearer someBearerTokenHere'.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device show-credentials
Get device credentials from IoT Central.
az iot central device show-credentials --app-id
--device-id
[--central-api-uri]
[--token]
Examples
Get device credentials for a device
az iot central device show-credentials --app-id {appid} --device-id {deviceid}
Required Parameters
Target App.
Target Device.
Optional Parameters
Central dns suffix. This enables running cli commands against non public/prod environments.
Authorization token for request. More info available here: https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/ MUST INCLUDE type (e.g. 'SharedAccessToken ...', 'Bearer ...'). Example: 'Bearer someBearerTokenHere'.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.