Bearbeiten

Freigeben über


Get-AzNotificationHubAuthorizationRule

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

Syntax

Get-AzNotificationHubAuthorizationRule
   [-ResourceGroup] <String>
   [-Namespace] <String>
   [-NotificationHub] <String>
   [[-AuthorizationRule] <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzNotificationHubAuthorizationRule 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-AzNotificationHubAuthorizationRule cmdlet only gets information about the authorization rules associated with a notification hub. To get information about the hub itself, use Get-AzNotificationHub.

Examples

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

Get-AzNotificationHubAuthorizationRule -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

Get-AzNotificationHubAuthorizationRule -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.

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
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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
Required:True
Accept pipeline input:True
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
Required:True
Accept pipeline input:True
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
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Outputs

SharedAccessAuthorizationRuleAttributes