Κοινή χρήση μέσω


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

--all --show-all

Show all shared access policies for the respective DPS.

Default value: False
--dps-name -n

Name or hostname of the Azure IoT Hub Device Provisioning Service. Required if --login is not provided.

--key-type --kt

Shared access policy key type for authentication.

Accepted values: primary, secondary
Default value: primary
--pn --policy-name

Shared access policy to use for authentication.

Default value: provisioningserviceowner
--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.