az notification-hub namespace authorization-rule

Commands to manage notification hubs namespace authorization rule.

Commands

az notification-hub namespace authorization-rule create

Create an authorization rule for a namespace.

az notification-hub namespace authorization-rule delete

Delete a namespace authorization rule.

az notification-hub namespace authorization-rule list

List the authorization rules for a namespace.

az notification-hub namespace authorization-rule list-keys

List the Primary and Secondary ConnectionStrings to the namespace.

az notification-hub namespace authorization-rule regenerate-keys

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

az notification-hub namespace authorization-rule show

Show an authorization rule for a namespace by name.

az notification-hub namespace authorization-rule create

Create an authorization rule for a namespace.

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

Examples

Create a namespace authorization rule

az notification-hub namespace authorization-rule create --resource-group \
MyResourceGroup --namespace-name my-namespace --name "sdk-AuthRules-1788" --rights Listen Send

Required Parameters

--name -n

The authorization rule name.

--namespace-name

The namespace 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 namespace authorization-rule delete

Delete a namespace authorization rule.

az notification-hub namespace authorization-rule delete --name
                                                        --namespace-name
                                                        --resource-group
                                                        [--yes]

Examples

Delete a namespace authorization rule

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

Required Parameters

--name -n

The authorization rule name.

--namespace-name

The namespace name.

--resource-group -g

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

Optional Parameters

--yes -y

Do not prompt for confirmation.

az notification-hub namespace authorization-rule list

List the authorization rules for a namespace.

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

Examples

List authorization rules of the namespace

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

Required Parameters

--namespace-name

The namespace name.

--resource-group -g

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

az notification-hub namespace authorization-rule list-keys

List the Primary and Secondary ConnectionStrings to the namespace.

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

Examples

List keys of the namesapce authorization rule

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

Required Parameters

--name -n

The authorization rule name.

--namespace-name

The namespace name.

--resource-group -g

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

az notification-hub namespace authorization-rule regenerate-keys

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

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

Examples

Regenerate keys of the namesapce authorization rule

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

Required Parameters

--name -n

The authorization rule name.

--namespace-name

The namespace name.

--policy-key

Name of the key that has to be regenerated for the Namespace 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 namespace authorization-rule show

Show an authorization rule for a namespace by name.

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

Examples

Show namespace authorization rule info

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

Required Parameters

--name -n

The authorization rule name.

--namespace-name

The namespace name.

--resource-group -g

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