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

Gets information about the authorization rules associated with a notification hub.

Syntax

Get-AzureRmNotificationHubAuthorizationRules
   [-ResourceGroup] <String>
   [-Namespace] <String>
   [-NotificationHub] <String>
   [[-AuthorizationRule] <String>]
   [<CommonParameters>]

Description

The Get-AzureRmNotificationHubAuthorizationRules cmdlet gets information about the Shared Access Signature (SAS) authorization rules associated with a notification hub. The cmdlet returns information about all the rules associated with a hub or, by including the AuthorizationRule parameter, gets information about a specific rule.

Authorization rules manage access to your notification hubs. An authorization rule will create links, as a URI, based on different permission levels. Clients are directed to one of these URIs based on the appropriate permission level. For instance, a client with the Listen permission will be directed to the URI for that permission.

The Get-AzureRmNotificationHubAuthorizationRules cmdlet only gets information about the authorization rules associated with a notification hub. To get information about the hub itself, use Get-AzureRmNotificationHub.

Examples

Example 1: Get information for all authorization rules assigned to a notification hub

PS C:\>Get-AzureRmNotificationHubAuthorizationRules -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup" -NotificationHub "ContosoInternalHub"

This command gets information for all the authorization rules assigned to the notification hub named ContosoInternalHub in the namespace ContosoNamespace. You must specify the namespace where the hub is located as well as the resource group that the hub has been assigned to.

Example 2: Get information for an authorization rules assigned to a notification hub

PS C:\>Get-AzureRmNotificationHubAuthorizationRules -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup" -NotificationHub "ContosoInternalHub" -AuthorizationRule "ListenRule"

This command gets information for all the authorization rules assigned to the notification hub named ContosoInternalHub in the namespace ContosoNamespace. The command uses the AuthorizationRule parameter to limit the returned data to a single authorization rule named ListenRule.

Required Parameters

-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 that this cmdlet assigns authorization rules. Notification hubs are used to send push notifications to multiple clients regardless of the platform used by those clients.

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 simplify inventory management and Azure administration.

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

Optional Parameters

-AuthorizationRule

Specifies the name of an SAS authentication rule. These rules determine the type of access that users have to the notification hub.

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