< Back

Get-AzureRmNotificationHubAuthorizationRules

Tue Jan 29, 2019 9:58 pm

NAME Get-AzureRmNotificationHubAuthorizationRules



SYNOPSIS

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





SYNTAX

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

<String>] [-DefaultProfile <IAzureContextContainer>] [<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.





PARAMETERS

-AuthorizationRule <String>

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



Required? false

Position? 3

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Namespace <String>

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



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-NotificationHub <String>

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.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroup <String>

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.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

System.Collections.Generic.List`1[Microsoft.Azure.Commands.NotificationHubs.Models.SharedAccessAuthorizationRuleAttributes]







NOTES









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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ationrules

Get-AzureRmNotificationHubsNamespaceAuthorizationRules

New-AzureRmNotificationHubAuthorizationRules

Remove-AzureRmNotificationHubAuthorizationRules

Set-AzureRmNotificationHubAuthorizationRules