az iot hub policy
Manage shared access policies of an IoT hub.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot hub policy create |
Create a new shared access policy in an IoT hub. |
Core | GA |
az iot hub policy delete |
Delete a shared access policy from an IoT hub. |
Core | GA |
az iot hub policy list |
List shared access policies of an IoT hub. |
Core | GA |
az iot hub policy renew-key |
Regenerate keys of a shared access policy of an IoT hub. |
Core | GA |
az iot hub policy show |
Get the details of a shared access policy of an IoT hub. |
Core | GA |
az iot hub policy create
Create a new shared access policy in an IoT hub.
az iot hub policy create --hub-name
--name
--permissions
[--resource-group]
Examples
Create a new shared access policy.
az iot hub policy create --hub-name MyIotHub --name new-policy --permissions RegistryWrite ServiceConnect DeviceConnect
Required Parameters
IoT Hub name.
Shared access policy name.
Permissions of shared access policy. Use space-separated list for multiple permissions. Possible values: RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect.
Optional Parameters
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.
az iot hub policy delete
Delete a shared access policy from an IoT hub.
az iot hub policy delete [--hub-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Delete a shared access policy from an IoT hub. (autogenerated)
az iot hub policy delete --hub-name MyHub --name MySharedAccessPolicy
Optional Parameters
IoT Hub name.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Shared access policy name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
az iot hub policy list
List shared access policies of an IoT hub.
az iot hub policy list [--hub-name]
[--ids]
[--resource-group]
[--subscription]
Examples
List shared access policies of an IoT hub. (autogenerated)
az iot hub policy list --hub-name MyHub --resource-group MyResourceGroup
Optional Parameters
IoT Hub name.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
az iot hub policy renew-key
Regenerate keys of a shared access policy of an IoT hub.
az iot hub policy renew-key --renew-key {primary, secondary, swap}
[--hub-name]
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Examples
Regenerate primary key of a shared access policy of an IoT hub.
az iot hub policy renew-key --hub-name MyHub --name MySharedAccessPolicy --rk Primary
Required Parameters
Regenerate keys.
Optional Parameters
IoT Hub name.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Shared access policy name.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
az iot hub policy show
Get the details of a shared access policy of an IoT hub.
az iot hub policy show [--hub-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Get the details of a shared access policy of an IoT hub. (autogenerated)
az iot hub policy show --hub-name MyHub --name MySharedAccessPolicy
Optional Parameters
IoT Hub name.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Shared access policy name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
Azure CLI