az iot du device deployment
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 deployment command. Learn more about extensions.
Device deployment management.
Deployments will apply a desired compatible update against a target device group distributing the update across device classes within the group. Cloud-initiated rollback policy can be optionally configured.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot du device deployment cancel |
Cancel a device class subgroup deployment. |
Extension | GA |
az iot du device deployment create |
Create a deployment for a device group. The deployment will be multi-cast against every device class subgroup within the target group. |
Extension | GA |
az iot du device deployment delete |
Delete a deployment by device group or device class subgroup. |
Extension | GA |
az iot du device deployment list |
List deployments for a device group or device class subgroup. |
Extension | GA |
az iot du device deployment list-devices |
List devices in a device class subgroup deployment along with their state. Useful for getting a list of failed devices. |
Extension | GA |
az iot du device deployment retry |
Retry a device class subgroup deployment. |
Extension | GA |
az iot du device deployment show |
Show a deployment for a device group or device class subgroup including status which details a breakdown of how many devices in the deployment are in progress, completed, or failed. |
Extension | GA |
az iot du device deployment cancel
Cancel a device class subgroup deployment.
az iot du device deployment cancel --account
--cid
--deployment-id
--gid
--instance
[--resource-group]
Examples
Cancel the target device class subgroup deployment.
az iot du device deployment cancel -n {account_name} -i {instance_name} --deployment-id {deployment_id} --group-id {device_group_id} --class-id {device_class_id}
Required Parameters
Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}
.
Device class Id. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash.
The caller-provided deployment Id. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote.
Device group Id. This is created from the value of the ADUGroup tag in the connected IoT Hub's device/module twin or $default for devices with no tag.
Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}
.
Optional Parameters
Device Update account resource group name. You can configure the default group using az config set defaults.adu_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 du device deployment create
Create a deployment for a device group. The deployment will be multi-cast against every device class subgroup within the target group.
az iot du device deployment create --account
--deployment-id
--gid
--instance
--un
--up
--update-version
[--failed-count]
[--failed-percentage]
[--rbun]
[--rbup]
[--rbuv]
[--resource-group]
[--start-time]
Examples
Create a device group deployment scheduled to start immediately (with respect to UTC time).
az iot du device deployment create -n {account_name} -i {instance_name} --group-id {device_group_id} --deployment-id {deployment_id} --update-name {update_name} --update-provider {update_provider} --update-version {update_version}
Create a device group deployment scheduled to start on a desired iso-8601 compliant datetime.
az iot du device deployment create -n {account_name} -i {instance_name} --group-id {device_group_id} --deployment-id {deployment_id} --update-name {update_name} --update-provider {update_provider} --update-version {update_version} --start-time "2022-12-20T01:00:00"
Create a device group deployment scheduled to start immediately with a defined cloud-initiated rollback policy. The cloud rollback is initiated when failed count or failed percentage targets are met.
az iot du device deployment create -n {account_name} -i {instance_name} --group-id {device_group_id} --deployment-id {deployment_id} --update-name {update_name} --update-provider {update_provider} --update-version {update_version} --failed-count 10 --failed-percentage 5 --rollback-update-name {rollback_update_name} --rollback-update-provider {rollback_update_provider} --rollback-update-version {rollback_update_version}
Required Parameters
Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}
.
The caller-provided deployment Id. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote.
Device group Id. This is created from the value of the ADUGroup tag in the connected IoT Hub's device/module twin or $default for devices with no tag.
Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}
.
The update name.
The update provider.
The update version.
Optional Parameters
Integer representing the number of failed devices in a deployment before a cloud initated rollback occurs. Required when defining rollback policy.
Integer representing the percentage of failed devices in a deployment before a cloud initated rollback occurs. Required when defining rollback policy.
The rollback update name.
The rollback update provider.
The rollback update version.
Device Update account resource group name. You can configure the default group using az config set defaults.adu_group={name}
.
The iso-8601 compliant start time for deployment. If no value is provided the corresponding value for UTC 'now' will be used.
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 du device deployment delete
Delete a deployment by device group or device class subgroup.
az iot du device deployment delete --account
--deployment-id
--gid
--instance
[--cid]
[--resource-group]
[--yes {false, true}]
Examples
Delete the target device group deployment.
az iot du device deployment delete -n {account_name} -i {instance_name} --deployment-id {deployment_id} --group-id {device_group_id}
Delete the target device class subgroup deployment.
az iot du device deployment delete -n {account_name} -i {instance_name} --deployment-id {deployment_id} --group-id {device_group_id} --class-id {device_class_id}
Required Parameters
Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}
.
The caller-provided deployment Id. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote.
Device group Id. This is created from the value of the ADUGroup tag in the connected IoT Hub's device/module twin or $default for devices with no tag.
Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}
.
Optional Parameters
Device class Id. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash.
Device Update account resource group name. You can configure the default group using az config set defaults.adu_group={name}
.
Skip user prompts. Indicates acceptance of action. Used primarily for automation scenarios. Default: false.
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 du device deployment list
List deployments for a device group or device class subgroup.
az iot du device deployment list --account
--gid
--instance
[--cid]
[--order-by]
[--resource-group]
Examples
List deployments for a device group.
az iot du device deployment list -n {account_name} -i {instance_name} --group-id {device_group_id}
List deployments for a device group ordering results by startDateTime descending.
az iot du device deployment list -n {account_name} -i {instance_name} --group-id {device_group_id} --order-by "startDateTime desc"
List deployments for a device class subgroup.
az iot du device deployment list -n {account_name} -i {instance_name} --group-id {device_group_id} --class-id {device_class_id}
Required Parameters
Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}
.
Device group Id. This is created from the value of the ADUGroup tag in the connected IoT Hub's device/module twin or $default for devices with no tag.
Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}
.
Optional Parameters
Device class Id. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash.
Orders the set of deployments returned. You can order by startDateTime [desc/asc].
Device Update account resource group name. You can configure the default group using az config set defaults.adu_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 du device deployment list-devices
List devices in a device class subgroup deployment along with their state. Useful for getting a list of failed devices.
az iot du device deployment list-devices --account
--cid
--deployment-id
--gid
--instance
[--filter]
[--resource-group]
Examples
List devices in a device class subgroup deployment.
az iot du device deployment list-devices -n {account_name} -i {instance_name} --group-id {device_group_id} --class-id {device_class_id} --deployment-id {deployment_id}
List devices in a device class subgroup deployment filtering by deviceId and deviceState.
az iot du device deployment list-devices -n {account_name} -i {instance_name} --group-id {device_group_id} --class-id {device_class_id} --deployment-id {deployment_id} --filter "deviceId eq 'd0' and deviceState eq 'InProgress'"
Required Parameters
Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}
.
Device class Id. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash.
The caller-provided deployment Id. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote.
Device group Id. This is created from the value of the ADUGroup tag in the connected IoT Hub's device/module twin or $default for devices with no tag.
Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}
.
Optional Parameters
Restricts the set of deployment device states returned. You can filter on deviceId and moduleId and/or deviceState.
Device Update account resource group name. You can configure the default group using az config set defaults.adu_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 du device deployment retry
Retry a device class subgroup deployment.
az iot du device deployment retry --account
--cid
--deployment-id
--gid
--instance
[--resource-group]
Examples
Retry the target device class subgroup deployment.
az iot du device deployment retry -n {account_name} -i {instance_name} --deployment-id {deployment_id} --group-id {device_group_id} --class-id {device_class_id}
Required Parameters
Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}
.
Device class Id. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash.
The caller-provided deployment Id. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote.
Device group Id. This is created from the value of the ADUGroup tag in the connected IoT Hub's device/module twin or $default for devices with no tag.
Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}
.
Optional Parameters
Device Update account resource group name. You can configure the default group using az config set defaults.adu_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 du device deployment show
Show a deployment for a device group or device class subgroup including status which details a breakdown of how many devices in the deployment are in progress, completed, or failed.
az iot du device deployment show --account
--deployment-id
--gid
--instance
[--cid]
[--resource-group]
[--status {false, true}]
Examples
Show a deployment for a device group.
az iot du device deployment show -n {account_name} -i {instance_name} --group-id {device_group_id} --deployment-id {deployment_id}
Show the status of a device group deployment.
az iot du device deployment show -n {account_name} -i {instance_name} --group-id {device_group_id} --deployment-id {deployment_id} --status
Show a deployment for a device class subgroup.
az iot du device deployment show -n {account_name} -i {instance_name} --group-id {device_group_id} --class-id {device_class_id} --deployment-id {deployment_id}
Show the status of a device class subgroup deployment.
az iot du device deployment show -n {account_name} -i {instance_name} --group-id {device_group_id} --class-id {device_class_id} --deployment-id {deployment_id} --status
Required Parameters
Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}
.
The caller-provided deployment Id. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote.
Device group Id. This is created from the value of the ADUGroup tag in the connected IoT Hub's device/module twin or $default for devices with no tag.
Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}
.
Optional Parameters
Device class Id. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash.
Device Update account resource group name. You can configure the default group using az config set defaults.adu_group={name}
.
Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, completed, or failed.
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.