Redigera

Dela via


Get-AzNotificationHubsNamespaceAuthorizationRule

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

Syntax

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

Description

The Get-AzNotificationHubsNamespaceAuthorizationRule cmdlet returns information about the Shared Access Signature (SAS) authorization rules associated with a notification hub namespace. You can return information about all the rules associated with the namespace. Alternatively, and by including the AuthorizationRule parameter, you can return information for a specific rule. Authorization rules manage access to namespaces. This is done through the creation of links, as URIs, based on different permission levels. Platform 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. This cmdlet only gets the authorization rules associated with a namespace. To get information about the namespace itself, use Get-AzNotificationHubsNamespace.

Examples

Example 1: Get information about all authorization rules assigned to namespaces

Get-AzNotificationHubsNamespaceAuthorizationRule -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup"

This command gets information about all the authorization rules assigned to both the namespace ContosoNamespace and the ContosoNotificationsGroup resource group.

Example 2: Get information about an authorization rule

Get-AzNotificationHubsNamespaceAuthorizationRule -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup" -AuthorizationRule "ListenRule"

This command gets information about a single namespace authorization rule named ListenRule. You must include the namespace and the resource group when you get information for a specific authorization rule.

Parameters

-AuthorizationRule

Specifies the name of a SAS authentication rule. These rules determine the type of access that users have to the namespace.

Type:String
Position:2
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 authorization rules are 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

-ResourceGroup

Specifies the resource group to which the authorization rules are 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
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Outputs

SharedAccessAuthorizationRuleAttributes