Share via


az iot du instance

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.59.0 or higher). The extension will automatically install the first time you run an az iot du instance command. Learn more about extensions.

Device Update instance management.

Commands

Name Description Type Status
az iot du instance create

Create a Device Update instance.

Extension GA
az iot du instance delete

Delete a Device Update instance.

Extension GA
az iot du instance list

List Device Update instances.

Extension GA
az iot du instance show

Show a Device Update instance.

Extension GA
az iot du instance update

Update a Device Update instance.

Extension GA
az iot du instance wait

Block until a desired instance resource state has been met.

Extension GA

az iot du instance create

Create a Device Update instance.

This command may also be used to update the state of an existing instance.

az iot du instance create --account
                          --instance
                          --iothub-ids
                          [--diagnostics-storage-id]
                          [--enable-diagnostics {false, true}]
                          [--no-wait]
                          [--resource-group]
                          [--tags]

Examples

Create an instance with minimum configuration.

az iot du instance create -n {account_name} -i {instance_name} --iothub-ids {iothub_resource_id}

Create an instance with diagnostics enabled, paired with a user provided storage account. Include tags.

az iot du instance create -n {account_name} -i {instance_name} --iothub-ids {iothub_resource_id} --enable-diagnostics --diagnostics-storage-id {storage_account_resource_id} --tags a=b

Required Parameters

--account -n

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

Property Value
Parameter group: Account Identifier Arguments
--instance -i

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

Property Value
Parameter group: Account Identifier Arguments
--iothub-ids

Space-separated IoT Hub resource Ids.

Property Value
Parameter group: IoT Hub Arguments

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--diagnostics-storage-id

User provided storage account resource Id for use in diagnostic logs collection.

Property Value
Parameter group: Storage Arguments
--enable-diagnostics

Enables diagnostic logs collection.

Property Value
Accepted values: false, true
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

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

Property Value
Parameter group: Account Identifier Arguments
--tags

Resource tags. Property bag in key-value pairs with the following format: a=b c=d.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

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

--subscription

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

--verbose

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

Property Value
Default value: False

az iot du instance delete

Delete a Device Update instance.

az iot du instance delete --account
                          --instance
                          [--no-wait]
                          [--resource-group]
                          [--yes {false, true}]

Examples

Delete an instance associated with the target account.

az iot du instance delete -n {account_name} -i {instance_name}

Delete an instance associated with the target account and skip the confirmation prompt.

az iot du instance delete -n {account_name} -i {instance_name} -y

Required Parameters

--account -n

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

Property Value
Parameter group: Account Identifier Arguments
--instance -i

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

Property Value
Parameter group: Account Identifier Arguments

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

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

Property Value
Parameter group: Account Identifier Arguments
--yes -y

Skip user prompts. Indicates acceptance of action. Used primarily for automation scenarios. Default: false.

Property Value
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

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

--subscription

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

--verbose

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

Property Value
Default value: False

az iot du instance list

List Device Update instances.

az iot du instance list --account
                        [--resource-group]

Examples

List instances associated with the target account.

az iot du instance list -n {account_name}

Required Parameters

--account -n

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

Property Value
Parameter group: Account Identifier Arguments

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

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

Property Value
Parameter group: Account Identifier Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

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

--subscription

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

--verbose

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

Property Value
Default value: False

az iot du instance show

Show a Device Update instance.

az iot du instance show --account
                        --instance
                        [--resource-group]

Examples

Show the details of an instance associated with the target account.

az iot du instance show -n {account_name} -i {instance_name}

Required Parameters

--account -n

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

Property Value
Parameter group: Account Identifier Arguments
--instance -i

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

Property Value
Parameter group: Account Identifier Arguments

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

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

Property Value
Parameter group: Account Identifier Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

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

--subscription

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

--verbose

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

Property Value
Default value: False

az iot du instance update

Update a Device Update instance.

Currently the following instance properties can be updated - iotHubs, enableDiagnostics, diagnosticStorageProperties and tags.

az iot du instance update --account
                          --instance
                          [--add]
                          [--force-string]
                          [--no-wait]
                          [--remove]
                          [--resource-group]
                          [--set]

Examples

Set a specific instance tag attribute.

az iot du instance update -n {account_name} -i {instance_name} --set tags.env='test'

Enable diagnostics and configure a storage account for log collection.

az iot du instance update -n {account_name} -i {instance_name} --set enableDiagnostics=true diagnosticStorageProperties.resourceId={storage_account_resource_id}

Required Parameters

--account -n

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

Property Value
Parameter group: Account Identifier Arguments
--instance -i

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

Property Value
Parameter group: Account Identifier Arguments

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Default value: False
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--resource-group -g

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

Property Value
Parameter group: Account Identifier Arguments
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

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

--subscription

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

--verbose

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

Property Value
Default value: False

az iot du instance wait

Block until a desired instance resource state has been met.

az iot du instance wait --account
                        --instance
                        [--created]
                        [--custom]
                        [--deleted]
                        [--exists]
                        [--interval]
                        [--resource-group]
                        [--timeout]
                        [--updated]

Examples

Block until the target instance has been deleted.

az iot du instance wait -n {account_name} -i {instance_name} --deleted

Required Parameters

--account -n

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

Property Value
Parameter group: Account Identifier Arguments
--instance -i

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

Property Value
Parameter group: Account Identifier Arguments

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--resource-group -g

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

Property Value
Parameter group: Account Identifier Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

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

--subscription

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

--verbose

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

Property Value
Default value: False