az notification-hub authorization-rule

Commands to manage notification hubs authorization rule.

Commands

az notification-hub authorization-rule create

Create an authorization rule for a NotificationHub.

az notification-hub authorization-rule delete

Delete a notificationHub authorization rule.

az notification-hub authorization-rule list

List the authorization rules for a NotificationHub.

az notification-hub authorization-rule list-keys

List the Primary and Secondary ConnectionStrings to the NotificationHub.

az notification-hub authorization-rule regenerate-keys

Regenerate the Primary/Secondary Keys to the NotificationHub Authorization Rule.

az notification-hub authorization-rule show

Show an authorization rule for a NotificationHub by name.

az notification-hub authorization-rule create

Create an authorization rule for a NotificationHub.

az notification-hub authorization-rule create --name
                                              --namespace-name
                                              --notification-hub-name
                                              --resource-group
                                              --rights

Examples

Create an authorization rule

az notification-hub authorization-rule create --resource-group MyResourceGroup \
--namespace-name my-namespace --notification-hub-name my-hub --name \
DefaultListenSharedAccessSignature --rights Listen Send

Required Parameters

--name -n

The authorization rule name.

--namespace-name

The namespace name.

--notification-hub-name

The notification hub name.

--resource-group -g

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

--rights

The rights associated with the rule.

az notification-hub authorization-rule delete

Delete a notificationHub authorization rule.

az notification-hub authorization-rule delete --name
                                              --namespace-name
                                              --notification-hub-name
                                              --resource-group

Examples

Delete the authorization rule

az notification-hub authorization-rule delete --resource-group MyResourceGroup \
--namespace-name my-namespace --notification-hub-name my-hub --name \
DefaultListenSharedAccessSignature

Required Parameters

--name -n

The authorization rule name.

--namespace-name

The namespace name.

--notification-hub-name

The notification hub name.

--resource-group -g

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

az notification-hub authorization-rule list

List the authorization rules for a NotificationHub.

az notification-hub authorization-rule list --namespace-name
                                            --notification-hub-name
                                            --resource-group

Examples

List authorization rules

az notification-hub authorization-rule list --resource-group MyResourceGroup \
--namespace-name my-namespace --notification-hub-name my-hub

Required Parameters

--namespace-name

The namespace name.

--notification-hub-name

The notification hub name.

--resource-group -g

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

az notification-hub authorization-rule list-keys

List the Primary and Secondary ConnectionStrings to the NotificationHub.

az notification-hub authorization-rule list-keys --name
                                                 --namespace-name
                                                 --notification-hub-name
                                                 --resource-group

Examples

List connectionStrings of the authorization rule

az notification-hub authorization-rule list-keys --resource-group MyResourceGroup --namespace-name my-namespace \
--notification-hub-name my-hub --name "sdk-AuthRules-5800"

Required Parameters

--name -n

The authorization rule name.

--namespace-name

The namespace name.

--notification-hub-name

The notification hub name.

--resource-group -g

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

az notification-hub authorization-rule regenerate-keys

Regenerate the Primary/Secondary Keys to the NotificationHub Authorization Rule.

az notification-hub authorization-rule regenerate-keys --name
                                                       --namespace-name
                                                       --notification-hub-name
                                                       --policy-key {Primary Key, Secondary Key}
                                                       --resource-group

Examples

Regenerate the Notification Hub authorization rule

az notification-hub authorization-rule regenerate-keys --resource-group MyResourceGroup --namespace-name \
my-namespace --notification-hub-name my-hub --name \
DefaultListenSharedAccessSignature --policy-key "Secondary Key"

Required Parameters

--name -n

The authorization rule name.

--namespace-name

The namespace name.

--notification-hub-name

The notification hub name.

--policy-key

Name of the key that has to be regenerated for the Notification Hub Authorization Rule.

accepted values: Primary Key, Secondary Key
--resource-group -g

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

az notification-hub authorization-rule show

Show an authorization rule for a NotificationHub by name.

az notification-hub authorization-rule show --name
                                            --namespace-name
                                            --notification-hub-name
                                            --resource-group

Examples

Show the authorization rule information

az notification-hub authorization-rule show --resource-group MyResourceGroup \
--namespace-name my-namespace --notification-hub-name my-hub --name \
DefaultListenSharedAccessSignature

Required Parameters

--name -n

The authorization rule name.

--namespace-name

The namespace name.

--notification-hub-name

The notification hub name.

--resource-group -g

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