az iot hub module-identity connection-string

Note

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

Manage IoT device module's connection string.

Commands

az iot hub module-identity connection-string show

Show a target IoT device module connection string.

az iot hub module-identity connection-string show

Show a target IoT device module connection string.

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

Required Parameters

--device-id -d

Target Device Id.

--module-id -m

Target Module Id.

Optional Parameters

--auth-type

Indicates whether the operation should auto-derive a policy key or use the current Azure AD session. 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. 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>.