az iot dps connection-string
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 dps connection-string command. Learn more about extensions.
Manage connection strings for an Azure IoT Hub Device Provisioning Service instance.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot dps connection-string show |
Show the connection strings for the specified Device Provisioning Services using the given policy name and key. |
Extension | GA |
az iot dps connection-string show
Show the connection strings for the specified Device Provisioning Services using the given policy name and key.
az iot dps connection-string show [--all]
[--dps-name]
[--key-type {primary, secondary}]
[--pn]
[--resource-group]
Examples
Show the connection strings for all active state DPS instances in a subscription using the default policy and primary key.
az iot dps connection-string show
Show the connection strings for all active state DPS instances in a resource group using the default policy and primary key.
az iot dps connection-string show --resource-group MyResourceGroup
Show all connection strings of the given DPS using primary key.
az iot dps connection-string show -n MyDPS --all
Show the connection string of the given DPS using the default policy and primary key.
az iot dps connection-string show -n MyDPS
Show the connection string of the given DPS using policy 'service' and secondary key.
az iot dps connection-string show -n MyDPS --policy-name service --key-type secondary
Optional Parameters
Show all shared access policies for the respective DPS.
Name or hostname of the Azure IoT Hub Device Provisioning Service. Required if --login is not provided.
Shared access policy key type for authentication.
Shared access policy to use for authentication.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.