az iot edge
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 edge command. Learn more about extensions.
Manage IoT solutions on the Edge.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot edge deployment |
Manage IoT Edge deployments at scale. |
Extension | GA |
az iot edge deployment create |
Create an IoT Edge deployment in a target IoT Hub. |
Extension | GA |
az iot edge deployment delete |
Delete an IoT Edge deployment. |
Extension | GA |
az iot edge deployment list |
List IoT Edge deployments in an IoT Hub. |
Extension | GA |
az iot edge deployment show |
Get the details of an IoT Edge deployment. |
Extension | GA |
az iot edge deployment show-metric |
Evaluate a target system metric defined in an IoT Edge deployment. |
Extension | GA |
az iot edge deployment update |
Update specified properties of an IoT Edge deployment. |
Extension | GA |
az iot edge devices |
Commands to manage IoT Edge devices. |
Extension | GA |
az iot edge devices create |
Create and configure multiple edge devices in an IoT Hub. |
Extension | Experimental |
az iot edge export-modules |
Export the edge modules' configuration on a single edge device. |
Extension | GA |
az iot edge set-modules |
Set edge modules on a single device. |
Extension | GA |
az iot edge export-modules
Export the edge modules' configuration on a single edge device.
The module twin configuration output can be directly used as the --content of "az iot edge set-modules".
az iot edge export-modules --device-id
[--auth-type {key, login}]
[--hub-name]
[--login]
[--resource-group]
Examples
Export module twin configuration on a target device.
az iot edge export-modules --hub-name {iothub_name} --device-id {device_id}
Required Parameters
Target Device Id.
Optional Parameters
Indicates whether the operation should auto-derive a policy key or use the current Azure AD session. If the authentication type is login and the resource hostname is provided, resource lookup will be skipped unless needed.You can configure the default using az configure --defaults iothub-data-auth-type={auth-type-value}
.
IoT Hub name or hostname. Required if --login is not provided.
This command supports an entity connection string with rights to perform action. Use to avoid session login via "az login". If both an entity connection string and name are provided the connection string takes priority. Required if --hub-name is not provided.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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 edge set-modules
Set edge modules on a single device.
Modules content is json and in the form of {"modulesContent":{...}} or {"content":{"modulesContent":{...}}}.
By default properties of system modules $edgeAgent and $edgeHub are validated against schemas installed with the IoT extension. This can be disabled by using the --no-validation switch.
Note: Upon execution the command will output the collection of modules applied to the device.
az iot edge set-modules --content
--device-id
[--auth-type {key, login}]
[--hub-name]
[--login]
[--resource-group]
Examples
Test edge modules while in development by setting modules on a target device.
az iot edge set-modules --hub-name {iothub_name} --device-id {device_id} --content ../modules_content.json
Required Parameters
IoT Edge deployment content. Provide file path or raw json.
Target Device Id.
Optional Parameters
Indicates whether the operation should auto-derive a policy key or use the current Azure AD session. If the authentication type is login and the resource hostname is provided, resource lookup will be skipped unless needed.You can configure the default using az configure --defaults iothub-data-auth-type={auth-type-value}
.
IoT Hub name or hostname. Required if --login is not provided.
This command supports an entity connection string with rights to perform action. Use to avoid session login via "az login". If both an entity connection string and name are provided the connection string takes priority. Required if --hub-name is not provided.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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.