az iot pnp key

Manage access keys to an IoT Plug and Play repository.

Commands

az iot pnp key create Create a key for the given repository.
az iot pnp key delete Delete a key from the given repository.
az iot pnp key list List repository's keys.
az iot pnp key show Get the details of a repository key.
az iot pnp key update Update the key for the given repository.

az iot pnp key create

Create a key for the given repository.

az iot pnp key create --repo-id
--role {admin, contributer, reader}
[--endpoint]
[--subscription]

Examples

Create a key for the given repository.

az iot pnp key create -r aaaabbbb11112222aaaabbbb1111222 --role Reader

Required Parameters

--repo-id -r

IoT Plug and Play repository Id.

--role

User role of the access key for the given IoT Plug and Play repository.

accepted values: admin, contributer, reader

Optional Parameters

--endpoint -e

IoT Plug and Play endpoint.

default value: <a href="https://provider.azureiotrepository.com">https://provider.azureiotrepository.com</a>
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az iot pnp key delete

Delete a key from the given repository.

az iot pnp key delete --key-id
--repo-id
[--endpoint]
[--subscription]

Examples

Delete a key from the given repository.

az iot pnp key delete -r aaaabbbb11112222aaaabbbb1111222 -k 12345

Required Parameters

--key-id -k

Access key for the given IoT Plug and Play repository.

--repo-id -r

IoT Plug and Play repository Id.

Optional Parameters

--endpoint -e

IoT Plug and Play endpoint.

default value: <a href="https://provider.azureiotrepository.com">https://provider.azureiotrepository.com</a>
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az iot pnp key list

List repository's keys.

az iot pnp key list --repo-id
[--endpoint]
[--subscription]

Examples

List repository's keys.

az iot pnp key list -r aaaabbbb11112222aaaabbbb1111222

Required Parameters

--repo-id -r

IoT Plug and Play repository Id.

Optional Parameters

--endpoint -e

IoT Plug and Play endpoint.

default value: <a href="https://provider.azureiotrepository.com">https://provider.azureiotrepository.com</a>
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az iot pnp key show

Get the details of a repository key.

az iot pnp key show --key-id
--repo-id
[--endpoint]
[--subscription]

Examples

Get the details of a repository key.

az iot pnp key show -r aaaabbbb11112222aaaabbbb1111222 -k 12345

Required Parameters

--key-id -k

Access key for the given IoT Plug and Play repository.

--repo-id -r

IoT Plug and Play repository Id.

Optional Parameters

--endpoint -e

IoT Plug and Play endpoint.

default value: <a href="https://provider.azureiotrepository.com">https://provider.azureiotrepository.com</a>
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az iot pnp key update

Update the key for the given repository.

az iot pnp key update --key-id
--repo-id
--role {admin, contributer, reader}
[--endpoint]
[--subscription]

Examples

Update the key for the given repository.

az iot pnp key update -r aaaabbbb11112222aaaabbbb1111222 -k 12345 --role admin

Required Parameters

--key-id -k

Access key for the given IoT Plug and Play repository.

--repo-id -r

IoT Plug and Play repository Id.

--role

User role of the access key for the given IoT Plug and Play repository.

accepted values: admin, contributer, reader

Optional Parameters

--endpoint -e

IoT Plug and Play endpoint.

default value: <a href="https://provider.azureiotrepository.com">https://provider.azureiotrepository.com</a>
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.