Share via


az iot du device health

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 du device health command. Learn more about extensions.

Device health-check utilities.

Commands

Name Description Type Status
az iot du device health list

List device health with respect to a target filter.

Extension GA

az iot du device health list

Experimental Preview Deprecated

List device health with respect to a target filter.

az iot du device health list --account
                             --filter
                             --instance
                             [--resource-group]

Examples

List healthy devices in an instance.

az iot du device health list -n {account_name} -i {instance_name} --filter "state eq 'Healthy'"

List unhealthy devices in an instance.

az iot du device health list -n {account_name} -i {instance_name} --filter "state eq 'Unhealthy'"

Show the health state for a target device.

az iot du device health list -n {account_name} -i {instance_name} --filter "deviceId eq 'd0'"

Required Parameters

--account -n
Experimental Preview Deprecated

Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}.

--filter
Experimental Preview Deprecated

Device health filter. Supports the properties of state or deviceId. If deviceId is provided moduleId can be optionally specified.

--instance -i
Experimental Preview Deprecated

Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}.

Optional Parameters

--resource-group -g
Experimental Preview Deprecated

Device Update account resource group name. You can configure the default group using az config set defaults.adu_group={name}.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.