az iot central device
Note
This reference is part of the azure-iot extension for the Azure CLI (version 2.46.0 or higher). The extension will automatically install the first time you run an az iot central device command. Learn more about extensions.
Manage and configure IoT Central devices.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot central device attestation |
Manage and configure IoT Central device attestation. |
Extension | GA |
az iot central device attestation create |
Create an individual device attestation. |
Extension | GA |
az iot central device attestation delete |
Remove an individual device attestation. |
Extension | GA |
az iot central device attestation show |
Get device attestation. |
Extension | GA |
az iot central device attestation update |
Update an individual device attestation via patch. |
Extension | GA |
az iot central device c2d-message |
Run device cloud-to-device messaging commands. |
Extension | GA |
az iot central device c2d-message purge |
Purges the cloud-to-device message queue for the target device. |
Extension | GA |
az iot central device command |
Run device commands. |
Extension | GA |
az iot central device command history |
Get the details for the latest command request and response sent to the device. |
Extension | GA |
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. |
Extension | GA |
az iot central device compute-device-key |
Generate a derived device SAS key. |
Extension | GA |
az iot central device create |
Create a device in IoT Central. |
Extension | GA |
az iot central device delete |
Delete a device from IoT Central. |
Extension | GA |
az iot central device edge |
Manage and configure IoT Central edge devices. |
Extension | GA |
az iot central device edge children |
Manage IoT Edge device children devices. |
Extension | GA |
az iot central device edge children add |
Add devices as children to a target edge device. |
Extension | Preview |
az iot central device edge children list |
Get the list of children of an IoT Edge device. |
Extension | GA |
az iot central device edge children remove |
Remove child devices from a target edge device. |
Extension | Preview |
az iot central device edge manifest |
Manage IoT Edge device manifests. |
Extension | Preview |
az iot central device edge manifest show |
Get the deployment manifest associated to the specified IoT Edge device. |
Extension | Preview |
az iot central device edge module |
Manage IoT Edge device modules. |
Extension | Preview |
az iot central device edge module list |
Get the list of modules in an IoT Edge device. |
Extension | Preview |
az iot central device edge module restart |
Restart a module in an IoT Edge device. |
Extension | Preview |
az iot central device edge module show |
Get a module in an IoT Edge device. |
Extension | Preview |
az iot central device list |
Get the list of devices for an IoT Central application. |
Extension | GA |
az iot central device list-components |
List the components present in a device. |
Extension | GA |
az iot central device list-modules |
List the modules present in a device. |
Extension | GA |
az iot central device manual-failback |
Reverts the previously executed failover command by moving the device back to it's original IoT Hub. |
Extension | GA |
az iot central device manual-failover |
Execute a manual failover of device across multiple IoT Hubs to validate device firmware's ability to reconnect using DPS to a different IoT Hub. |
Extension | GA |
az iot central device registration-info |
Get registration info on device(s) from IoT Central. |
Extension | GA |
az iot central device show |
Get a device from IoT Central. |
Extension | GA |
az iot central device show-credentials |
Get device credentials from IoT Central. |
Extension | GA |
az iot central device telemetry |
Query IoT Central device last telemetry value. |
Extension | GA |
az iot central device telemetry show |
Get the last telemetry value from a device. |
Extension | GA |
az iot central device twin |
Manage IoT Central device twins. |
Extension | GA |
az iot central device twin replace |
Replace writable property values of a device, a device component or a device module or a device module component. |
Extension | GA |
az iot central device twin show |
Get all property values of a device, a device component, a device module or a device module component. |
Extension | GA |
az iot central device twin update |
Update writable property values of a device, a device component, a device module or a device module component. |
Extension | GA |
az iot central device update |
Update a device in IoT Central. |
Extension | GA |
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
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
The primary symmetric shared access key stored in base64 format.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--device-name]
[--organizations]
[--simulated {false, true}]
[--template]
[--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} --template {devicetemplateid} --simulated
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
Unique identifier for the device. A case-sensitive string (up to 128 characters long) of ASCII 7-bit alphanumeric characters plus certain special characters: - . + % _ # * ? ! ( ) , : = @ $ '.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
Human readable device name. Example: Fridge.
Assign the device to the specified organizations. Comma separated list of organization ids. Minimum supported version: 1.1-preview.
Add this flag if you would like IoT Central to set this up as a simulated device. --template is required if this is true.
Central template id. Example: dtmi:ojpkindbz:modelDefinition:iild3tm_uo.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--token]
Examples
Delete a device
az iot central device delete --app-id {appid} --device-id {deviceid}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device list
Get the list of devices for an IoT Central application.
az iot central device list --app-id
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--edge-only]
[--token]
Examples
List all devices in an application, sorted by device Id (default)
az iot central device list --app-id {appid}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
Only list IoT Edge devices.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device list-components
List the components present in a device.
az iot central device list-components --app-id
--device-id
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--mn]
[--token]
Examples
List the components present in a device
az iot central device list-components --app-id {appid} --device-id {deviceid}
List the components present in a device module
az iot central device list-components --app-id {appid} --module-name {modulename} --device-id {deviceid}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
The name of the device module.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device list-modules
List the modules present in a device.
az iot central device list-modules --app-id
--device-id
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--token]
Examples
List the modules present in a device
az iot central device list-modules --app-id {appid} --device-id {deviceid}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device manual-failback
Reverts the previously executed failover command by moving the device back to it's original IoT Hub.
For more information about high availability visit https://github.com/iot-for-all/iot-central-high-availability-clients#readme.
az iot central device manual-failback --app-id
--device-id
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--token]
Examples
Reverts the previously executed failover command by moving the device back to it's original IoT Hub
az iot central device manual-failback --app-id {appid} --device-id {deviceid}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device manual-failover
Execute a manual failover of device across multiple IoT Hubs to validate device firmware's ability to reconnect using DPS to a different IoT Hub.
For more information about high availability and default value for ttl-minutes visit https://github.com/iot-for-all/iot-central-high-availability-clients#readme.
az iot central device manual-failover --app-id
--device-id
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--token]
[--ttl]
Examples
Execute a manual failover of device across multiple IoT Hubs to validate device firmware's ability to reconnect using DPS to a different IoT Hub.
az iot central device manual-failover --app-id {appid} --device-id {deviceid} --ttl-minutes {ttl_minutes}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
A positive integer. TTL in minutes to move device back to the original hub.Has default value in backend. See documentation on what the latest backend default time to live valueby visiting https://github.com/iot-for-all/iot-central-high-availability-clients#readme.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
[--api-version {2022-06-30-preview, 2022-07-31}]
[--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
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--token]
Examples
Get a device
az iot central device show --app-id {appid} --device-id {deviceid}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
[--api-version {2022-06-30-preview, 2022-07-31}]
[--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
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az iot central device update
Update a device in IoT Central.
Allows to change the following properties of a device: "displayName", "template", "simulated", "enabled" and "organizations". Device Id cannot be changed.
az iot central device update --app-id
--device-id
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--device-name]
[--enable {false, true}]
[--organizations]
[--simulated {false, true}]
[--template]
[--token]
Examples
Update a device display name
az iot central device update --app-id {appid} --device-id {deviceid} --device-name {deviceName}
Turn a simulated device to a real one
az iot central device update --app-id {appid} --device-id {deviceid} --simulated false
Update organizations for the device
az iot central device update --app-id {appid} --device-id {deviceid} --organizations {organizations}
Disable a device
az iot central device update --app-id {appid} --device-id {deviceid} --enable false
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
Human readable device name. Example: Fridge.
Add this flag if you would like IoT Central to enable or disable the device.
Assign the device to the specified organizations. Comma separated list of organization ids. Minimum supported version: 1.1-preview.
Add this flag if you would like IoT Central to set this up as a simulated device. --template is required if this is true.
Central template id. Example: dtmi:ojpkindbz:modelDefinition:iild3tm_uo.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.