Get-AzureRmNotificationHubsNamespaceListKeys

Gets the primary and secondary connection strings associated with a notification hub namespace authorization rule.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

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

Description

The Get-AzureRmNotificationHubsNamespaceListKeys cmdlet returns the primary and secondary connection strings for a Shared Access Signature (SAS) authorization rule assigned to a notification hub namespace. Authorization rules manage user rights to a notification hub namespace. Each rule includes a primary and a secondary connection string.

Examples

Example 1: Get the primary and secondary connection strings for an authorization rule

PS C:\>Get-AzureRmNotificationHubsNamespaceListKeys -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup" -AuthorizationRule "ListenRule"

This command returns the primary and secondary connection strings for the authorization rule named ListenRule assigned to the ContosoNamespace namespace. When you run this command you must include the name of the resource group that the namespace is assigned to.

Parameters

-AuthorizationRule

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

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Namespace

Specifies the namespace containing the connection strings that this cmdlet gets.

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 namespace is 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

ResourceListKeys