az iot dps access-policy

Manage Azure IoT Hub Device Provisioning Service access policies.

Commands

az iot dps access-policy create Create a new shared access policy in an Azure IoT Hub device provisioning service.
az iot dps access-policy delete Delete a shared access policies in an Azure IoT Hub device provisioning service.
az iot dps access-policy list List all shared access policies in an Azure IoT Hub device provisioning service.
az iot dps access-policy show Show details of a shared access policies in an Azure IoT Hub device provisioning service.
az iot dps access-policy update Update a shared access policy in an Azure IoT Hub device provisioning service.

az iot dps access-policy create

Create a new shared access policy in an Azure IoT Hub device provisioning service.

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

Examples

Create a new shared access policy in an Azure IoT Hub device provisioning service with EnrollmentRead right

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

Required Parameters

--access-policy-name --name -n

A friendly name for DPS access policy.

--dps-name

IoT Provisioning Service name.

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

--primary-key

Primary SAS key value.

--secondary-key

Secondary SAS key value.

az iot dps access-policy delete

Delete a shared access policies in an Azure IoT Hub device provisioning service.

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

Examples

Delete shared access policy 'MyPolicy' in an Azure IoT Hub device provisioning service

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

Required Parameters

--access-policy-name --name -n

A friendly name for DPS access policy.

--dps-name

IoT Provisioning Service name.

--resource-group -g

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

Optional Parameters

--no-wait

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

az iot dps access-policy list

List all shared access policies in an Azure IoT Hub device provisioning service.

az iot dps access-policy list --dps-name
--resource-group

Examples

List all shared access policies in MyDps

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

Required Parameters

--dps-name

IoT Provisioning Service name.

--resource-group -g

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

az iot dps access-policy show

Show details of a shared access policies in an Azure IoT Hub device provisioning service.

az iot dps access-policy show --access-policy-name
--dps-name
--resource-group

Examples

Show details of shared access policy 'MyPolicy' in an Azure IoT Hub device provisioning service

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

Required Parameters

--access-policy-name --name -n

A friendly name for DPS access policy.

--dps-name

IoT Provisioning Service name.

--resource-group -g

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

az iot dps access-policy update

Update a shared access policy in an Azure IoT Hub device provisioning service.

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

Examples

Update access policy 'MyPolicy' in an Azure IoT Hub device provisioning service with EnrollmentWrite right

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

Required Parameters

--access-policy-name --name -n

A friendly name for DPS access policy.

--dps-name

IoT Provisioning Service name.

--resource-group -g

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

Optional Parameters

--no-wait

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

--primary-key

Primary SAS key value.

--rights -r

Access rights for the IoT provisioning service. Use space-separated list for multiple rights.

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

Secondary SAS key value.