az iot hub device-identity connection-string

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.37.0 or higher). The extension will automatically install the first time you run an az iot hub device-identity connection-string command. Learn more about extensions.

Manage IoT device's connection string.

Commands

Name Description Type Status
az iot hub device-identity connection-string show

Show a given IoT Hub device connection string.

Extension GA

az iot hub device-identity connection-string show

Show a given IoT Hub device connection string.

az iot hub device-identity connection-string show --device-id
                                                  [--auth-type {key, login}]
                                                  [--hub-name]
                                                  [--key-type {primary, secondary}]
                                                  [--login]
                                                  [--resource-group]

Required Parameters

--device-id -d

Target Device Id.

Optional Parameters

--auth-type

Indicates whether the operation should auto-derive a policy key or use the current Azure AD session. If the authentication type is login and the resource hostname is provided, resource lookup will be skipped unless needed.You can configure the default using az configure --defaults iothub-data-auth-type=<auth-type-value>.

accepted values: key, login
default value: key
--hub-name -n

IoT Hub name or hostname. Required if --login is not provided.

--key-type --kt

Shared access policy key type for authentication.

accepted values: primary, secondary
default value: primary
--login -l

This command supports an entity connection string with rights to perform action. Use to avoid session login via "az login". If both an entity connection string and name are provided the connection string takes priority. Required if --hub-name is not provided.

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