az iot dps linked-hub

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Manage linked IoT Hubs in an Azure IoT Hub Device Provisioning Service instance.

Commands

Name Description Type Status
az iot dps linked-hub create

Create a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

Core GA
az iot dps linked-hub create (azure-iot extension)

Create a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

Extension GA
az iot dps linked-hub delete

Update a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

Core GA
az iot dps linked-hub delete (azure-iot extension)

Update a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

Extension GA
az iot dps linked-hub list

List all linked IoT hubs in an Azure IoT Hub Device Provisioning Service instance.

Core GA
az iot dps linked-hub list (azure-iot extension)

List all linked IoT hubs in an Azure IoT Hub Device Provisioning Service instance.

Extension GA
az iot dps linked-hub show

Show details of a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

Core GA
az iot dps linked-hub show (azure-iot extension)

Show details of a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

Extension GA
az iot dps linked-hub update

Update a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

Core GA
az iot dps linked-hub update (azure-iot extension)

Update a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

Extension GA

az iot dps linked-hub create

Create a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

az iot dps linked-hub create --dps-name
                             [--acquire-policy-token]
                             [--allocation-weight]
                             [--apply-allocation-policy {false, true}]
                             [--change-reference]
                             [--connection-string]
                             [--hn --hub-name]
                             [--hrg --hub-resource-group]
                             [--no-wait]
                             [--resource-group]

Examples

Create a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance

az iot dps linked-hub create --dps-name MyDps --resource-group MyResourceGroup --location westus --connection-string 'HostName=myhub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=12345'

Create a linked IoT hub in an Azure IoT Hub Device Provisioning Service which applies allocation weight and weight being 10

az iot dps linked-hub create --dps-name MyDps --resource-group MyResourceGroup --location westus --allocation-weight 10 --apply-allocation-policy True --connection-string 'HostName=myhub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=12345'

Required Parameters

--dps-name

IoT Hub Device Provisioning Service name.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--allocation-weight

Allocation weight of the IoT hub.

--apply-allocation-policy

A boolean indicating whether to apply allocation policy to the IoT hub.

Property Value
Accepted values: false, true
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--connection-string

Connection string of the IoT hub. Required if hub name is not provided using --hub-name.

Property Value
Parameter group: IoT Hub Identifier Arguments
--hn --hub-name

IoT Hub name.

Property Value
Parameter group: IoT Hub Identifier Arguments
--hrg --hub-resource-group

IoT Hub resource group name.

Property Value
Parameter group: IoT Hub Identifier Arguments
--no-wait

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

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

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 dps linked-hub create (azure-iot extension)

Create a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

az iot dps linked-hub create --dps-name
                             [--acquire-policy-token]
                             [--allocation-weight]
                             [--apply-allocation-policy {false, true}]
                             [--auth-type --authentication-type {KeyBased, SystemAssigned, UserAssigned}]
                             [--change-reference]
                             [--connection-string --cs]
                             [--hn --hub-name]
                             [--hostname-type --ht {auto, classic, device}]
                             [--hrg --hub-resource-group]
                             [--no-wait]
                             [--resource-group]
                             [--uai --user-assigned-identity]

Examples

Create a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance

az iot dps linked-hub create --dps-name MyDps --resource-group MyResourceGroup --location westus --connection-string 'HostName=myhub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=12345'

Create a linked IoT hub in an Azure IoT Hub Device Provisioning Service which applies allocation weight and weight being 10

az iot dps linked-hub create --dps-name MyDps --resource-group MyResourceGroup --location westus --allocation-weight 10 --apply-allocation-policy True --connection-string 'HostName=myhub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=12345'

Required Parameters

--dps-name

IoT Hub Device Provisioning Service name.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--allocation-weight

Allocation weight of the IoT hub.

--apply-allocation-policy

A boolean indicating whether to apply allocation policy to the IoT hub.

Property Value
Accepted values: false, true
--auth-type --authentication-type
Preview

Authentication type for the linked IoT Hub. 'KeyBased' uses a connection string. 'SystemAssigned' uses the DPS system-assigned managed identity. 'UserAssigned' uses a user-assigned managed identity.

Property Value
Accepted values: KeyBased, SystemAssigned, UserAssigned
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--connection-string --cs

Connection string of the IoT hub. Required if hub name is not provided using --hub-name.

Property Value
Parameter group: IoT Hub Identifier Arguments
--hn --hub-name

IoT Hub name.

Property Value
Parameter group: IoT Hub Identifier Arguments
--hostname-type --ht
Preview

Type of IoT Hub hostname to use when linking. 'auto' uses the TLS 1.3 device hostname if available, classic otherwise. 'device' uses the TLS 1.3 device hostname (errors if not GWv2). 'classic' uses the classic hostname (hub.azure-devices.net). Only applies when --hub-name is provided.

Property Value
Default value: auto
Accepted values: auto, classic, device
--hrg --hub-resource-group

IoT Hub resource group name.

Property Value
Parameter group: IoT Hub Identifier Arguments
--no-wait

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

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

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--uai --user-assigned-identity
Preview

User-assigned managed identity resource ID. Required when authentication type is UserAssigned.

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 dps linked-hub delete

Update a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

az iot dps linked-hub delete --dps-name
                             --linked-hub
                             [--acquire-policy-token]
                             [--change-reference]
                             [--no-wait]
                             [--resource-group]

Examples

Delete linked IoT hub 'MyLinkedHub' in an Azure IoT Hub Device Provisioning Service instance

az iot dps linked-hub delete --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub

Required Parameters

--dps-name

IoT Hub Device Provisioning Service name.

--linked-hub

Host name of linked IoT Hub.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

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

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

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 dps linked-hub delete (azure-iot extension)

Update a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

az iot dps linked-hub delete --dps-name
                             --linked-hub
                             [--acquire-policy-token]
                             [--change-reference]
                             [--no-wait]
                             [--resource-group]

Examples

Delete linked IoT hub 'MyLinkedHub' in an Azure IoT Hub Device Provisioning Service instance

az iot dps linked-hub delete --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub

Required Parameters

--dps-name

IoT Hub Device Provisioning Service name.

--linked-hub

Host name of linked IoT Hub.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

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

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

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 dps linked-hub list

List all linked IoT hubs in an Azure IoT Hub Device Provisioning Service instance.

az iot dps linked-hub list --dps-name
                           [--resource-group]

Examples

List all linked IoT hubs in MyDps

az iot dps linked-hub list --dps-name MyDps --resource-group MyResourceGroup

Required Parameters

--dps-name

IoT Hub Device Provisioning Service name.

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

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 dps linked-hub list (azure-iot extension)

List all linked IoT hubs in an Azure IoT Hub Device Provisioning Service instance.

az iot dps linked-hub list --dps-name
                           [--resource-group]

Examples

List all linked IoT hubs in MyDps

az iot dps linked-hub list --dps-name MyDps --resource-group MyResourceGroup

Required Parameters

--dps-name

IoT Hub Device Provisioning Service name.

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

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 dps linked-hub show

Show details of a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

az iot dps linked-hub show --dps-name
                           --linked-hub
                           [--resource-group]

Examples

Show details of linked IoT hub 'MyLinkedHub' in an Azure IoT Hub Device Provisioning Service

az iot dps linked-hub show --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub

Required Parameters

--dps-name

IoT Hub Device Provisioning Service name.

--linked-hub

Host name of linked IoT Hub.

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

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 dps linked-hub show (azure-iot extension)

Show details of a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

az iot dps linked-hub show --dps-name
                           --linked-hub
                           [--resource-group]

Examples

Show details of linked IoT hub 'MyLinkedHub' in an Azure IoT Hub Device Provisioning Service

az iot dps linked-hub show --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub

Required Parameters

--dps-name

IoT Hub Device Provisioning Service name.

--linked-hub

Host name of linked IoT Hub.

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

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 dps linked-hub update

Update a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

az iot dps linked-hub update --dps-name
                             --linked-hub
                             [--acquire-policy-token]
                             [--allocation-weight]
                             [--apply-allocation-policy {false, true}]
                             [--change-reference]
                             [--no-wait]
                             [--resource-group]

Examples

Update linked IoT hub 'MyLinkedHub.azure-devices.net' in an Azure IoT Hub Device Provisioning Service

az iot dps linked-hub update --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub.azure-devices.net --allocation-weight 10 --apply-allocation-policy True

Required Parameters

--dps-name

IoT Hub Device Provisioning Service name.

--linked-hub

Host name of linked IoT Hub.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--allocation-weight

Allocation weight of the IoT hub.

--apply-allocation-policy

A boolean indicating whether to apply allocation policy to the Iot hub.

Property Value
Accepted values: false, true
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

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

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

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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 dps linked-hub update (azure-iot extension)

Update a linked IoT hub in an Azure IoT Hub Device Provisioning Service instance.

az iot dps linked-hub update --dps-name
                             [--acquire-policy-token]
                             [--allocation-weight]
                             [--apply-allocation-policy {false, true}]
                             [--auth-type --authentication-type {KeyBased, SystemAssigned, UserAssigned}]
                             [--change-reference]
                             [--connection-string --cs]
                             [--hn --hub-name]
                             [--linked-hub]
                             [--no-wait]
                             [--resource-group]
                             [--uai --user-assigned-identity]

Examples

Update linked IoT hub 'MyLinkedHub.azure-devices.net' in an Azure IoT Hub Device Provisioning Service

az iot dps linked-hub update --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub.azure-devices.net --allocation-weight 10 --apply-allocation-policy True

Required Parameters

--dps-name

IoT Hub Device Provisioning Service name.

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--allocation-weight

Allocation weight of the IoT hub.

--apply-allocation-policy

A boolean indicating whether to apply allocation policy to the IoT hub.

Property Value
Accepted values: false, true
--auth-type --authentication-type
Preview

Switch the linked hub to a different authentication type. 'KeyBased' uses a connection string (supplied via --connection-string, otherwise auto-fetched from the identified hub). 'SystemAssigned' uses the DPS system-assigned managed identity. 'UserAssigned' uses a user-assigned managed identity.

Property Value
Accepted values: KeyBased, SystemAssigned, UserAssigned
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--connection-string --cs
Preview

IoT Hub connection string to use when switching to KeyBased authentication. If omitted, the key is auto-fetched from the identified hub.

--hn --hub-name
Preview

IoT Hub short name. Preferred over --linked-hub; resolves to the correct entry regardless of classic/device hostname.

Property Value
Parameter group: Linked Hub Identifier Arguments
--linked-hub

Full host name of the linked IoT Hub (e.g. myhub.device.azure-devices.net). Use this to disambiguate when --hub-name resolves to multiple entries.

Property Value
Parameter group: Linked Hub Identifier Arguments
--no-wait

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

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

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--uai --user-assigned-identity
Preview

User-assigned managed identity resource ID. Required when --authentication-type is UserAssigned.

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