Κοινή χρήση μέσω


az iot du instance

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 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}.

--instance -i

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

--iothub-ids

Space-separated IoT Hub resource Ids.

Optional Parameters

--diagnostics-storage-id

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

--enable-diagnostics

Enables diagnostic logs collection.

Accepted values: false, true
--no-wait

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

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}.

--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.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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}.

--instance -i

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

Optional Parameters

--no-wait

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

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}.

--yes -y

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

Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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}.

Optional Parameters

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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}.

--instance -i

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

Optional Parameters

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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}.

--instance -i

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

Optional Parameters

--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>.

Default value: []
--force-string

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

Default value: False
--no-wait

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

Default value: False
--remove

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

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}.

--set

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

Default value: []
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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}.

--instance -i

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

Optional Parameters

--created

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

Default value: False
--custom

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

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--interval

Polling interval in seconds.

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}.

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.