az iot dps policy

Manage shared access policies for an Azure IoT Hub Device Provisioning Service instance.

Commands

Name Description Type Status
az iot dps policy create

Create a new shared access policy in an Azure IoT Hub Device Provisioning Service instance.

Core GA
az iot dps policy delete

Delete a shared access policies in an Azure IoT Hub Device Provisioning Service instance.

Core GA
az iot dps policy list

List all shared access policies in an Azure IoT Hub Device Provisioning Service instance.

Core GA
az iot dps policy show

Show details of a shared access policies in an Azure IoT Hub Device Provisioning Service instance.

Core GA
az iot dps policy update

Update a shared access policy in an Azure IoT Hub Device Provisioning Service instance.

Core GA

az iot dps policy create

Create a new shared access policy in an Azure IoT Hub Device Provisioning Service instance.

az iot dps policy create --dps-name
                         --pn
                         --rights {DeviceConnect, EnrollmentRead, EnrollmentWrite, RegistrationStatusRead, RegistrationStatusWrite, ServiceConfig}
                         [--no-wait]
                         [--primary-key]
                         [--resource-group]
                         [--secondary-key]

Examples

Create a new shared access policy in an Azure IoT Hub Device Provisioning Service instance with EnrollmentRead right

az iot dps policy create --dps-name MyDps --resource-group MyResourceGroup --policy-name MyPolicy --rights EnrollmentRead

Required Parameters

--dps-name -n

IoT Hub Device Provisioning Service name.

--pn --policy-name

A friendly name for DPS access policy.

--rights -r

Access rights for the IoT Hub Device Provisioning Service. Use space-separated list for multiple rights.

accepted values: DeviceConnect, EnrollmentRead, EnrollmentWrite, RegistrationStatusRead, RegistrationStatusWrite, ServiceConfig

Optional Parameters

--no-wait

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

default value: False
--primary-key

Primary SAS key value.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--secondary-key

Secondary SAS key value.

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

Delete a shared access policies in an Azure IoT Hub Device Provisioning Service instance.

az iot dps policy delete --dps-name
                         --pn
                         [--no-wait]
                         [--resource-group]

Examples

Delete shared access policy 'MyPolicy' in the Azure IoT Hub Device Provisioning Service instance 'MyDps'

az iot dps policy delete --dps-name MyDps --resource-group MyResourceGroup --policy-name MyPolicy

Required Parameters

--dps-name -n

IoT Hub Device Provisioning Service name.

--pn --policy-name

A friendly name for DPS access policy.

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

List all shared access policies in an Azure IoT Hub Device Provisioning Service instance.

az iot dps policy list --dps-name
                       [--resource-group]

Examples

List all shared access policies in MyDps in the Azure IoT Hub Device Provisioning Service instance 'MyDps'

az iot dps policy list --dps-name MyDps --resource-group MyResourceGroup

Required Parameters

--dps-name -n

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

Show details of a shared access policies in an Azure IoT Hub Device Provisioning Service instance.

az iot dps policy show --dps-name
                       --pn
                       [--resource-group]

Examples

Show details of shared access policy 'MyPolicy' in the Azure IoT Hub Device Provisioning Service instance 'MyDps'

az iot dps policy show --dps-name MyDps --resource-group MyResourceGroup --policy-name MyPolicy

Required Parameters

--dps-name -n

IoT Hub Device Provisioning Service name.

--pn --policy-name

A friendly name for DPS access policy.

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

Update a shared access policy in an Azure IoT Hub Device Provisioning Service instance.

az iot dps policy update --dps-name
                         --pn
                         [--no-wait]
                         [--primary-key]
                         [--resource-group]
                         [--rights {DeviceConnect, EnrollmentRead, EnrollmentWrite, RegistrationStatusRead, RegistrationStatusWrite, ServiceConfig}]
                         [--secondary-key]

Examples

Update shared access policy 'MyPolicy' in an Azure IoT Hub Device Provisioning Service instance with EnrollmentWrite right

az iot dps policy update --dps-name MyDps --resource-group MyResourceGroup --policy-name MyPolicy --rights EnrollmentWrite

Required Parameters

--dps-name -n

IoT Hub Device Provisioning Service name.

--pn --policy-name

A friendly name for DPS access policy.

Optional Parameters

--no-wait

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

default value: False
--primary-key

Primary SAS key value.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--rights -r

Access rights for the IoT Hub Device Provisioning Service. Use space-separated list for multiple rights.

accepted values: DeviceConnect, EnrollmentRead, EnrollmentWrite, RegistrationStatusRead, RegistrationStatusWrite, ServiceConfig
--secondary-key

Secondary SAS key value.

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.