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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
IoT Hub name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Shared access policy name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
IoT Hub name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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 --rk {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.
Property | Value |
---|---|
Accepted values: | primary, secondary, swap |
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
IoT Hub name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Shared access policy name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
IoT Hub name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Shared access policy name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |