Edit

Share via


Get-AzNotificationHubAuthorizationRule

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

Syntax

Default (Default)

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Namespace

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

SharedAccessAuthorizationRuleAttributes