Share via


az iot dps linked-hub

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 delete

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

Core 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 show

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

Core 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 create

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

az iot dps linked-hub create --dps-name
                             [--allocation-weight]
                             [--apply-allocation-policy {false, true}]
                             [--connection-string]
                             [--hn]
                             [--hrg]
                             [--location]
                             [--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

--allocation-weight

Allocation weight of the IoT hub.

--apply-allocation-policy

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

Accepted values: false, true
--connection-string

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

--hn --hub-name

IoT Hub name.

--hrg --hub-resource-group

IoT Hub resource group name.

--location -l
Deprecated

Argument 'location' has been deprecated and will be removed in a future release.

Location of the IoT hub.

--no-wait

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

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.

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

--no-wait

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

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.

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

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

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

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

--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 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
                             [--allocation-weight]
                             [--apply-allocation-policy {false, true}]
                             [--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

--allocation-weight

Allocation weight of the IoT hub.

--apply-allocation-policy

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

Accepted values: false, true
--no-wait

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

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.

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