Remove-​Azure​Rm​Notification​Hub​Authorization​Rules

Removes an authorization rule from a notification hub.

Syntax

Remove-AzureRmNotificationHubAuthorizationRules
      [-ResourceGroup] <String>
      [-Namespace] <String>
      [-NotificationHub] <String>
      [-AuthorizationRule] <String>
      [-Confirm]
      [-Force]
      [-WhatIf]
      [<CommonParameters>]

Description

The Remove-AzureRmNotificationHubAuthorizationRules cmdlet removes a Shared Access Signature (SAS) authorization rule from a notification hub.

Authorization rules manage access to your notification hubs through the creation of links, as URIs, based on different permission levels. Permission levels can be one of the following:

- Listen

  • Send
  • Manage

    Clients are directed to one of these URIs based on the appropriate permission level. For instance, a client given the Listen permission will be directed to the URI for that permission.

    Removing an authorization rule also removes the corresponding user permission.

Examples

Example 1: Remove an authorization rule from a notification hub

PS C:\>Remove-AzureRmNotificationHubAuthorizationRules -Namespace "ContosoNamespace" -NotificationHub "ContosoExternalHub" -ResourceGroup "ContosoNotificationsGroup" -AuthorizationRule "ListenRule"

This command removes the authorization rule named ListenRule from the notification hub named ContosoExternalHub. When you run this command you must specify both the namespace and the resource group that the hub is assigned to.

Required Parameters

-AuthorizationRule

Specifies the name of the SAS authentication rule that this cmdlet removes.

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Namespace

Specifies the namespace to which the notification hub is assigned. Namespaces provide a way to group and categorize notification hubs.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-NotificationHub

Specifies the notification hub the authorization rules are assigned to. Notification hubs are used to send push notifications to multiple clients regardless of the platform.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroup

Specifies the resource group to which the notification hub is assigned. Resource groups organize items such as namespaces, notification hubs, and authorization rules in ways that help simply inventory management and Azure administration.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Do not ask for confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False