Get-AzEventHubKey

Gets the primary key details of the specified Event Hubs authorization rule.

Syntax

Get-AzEventHubKey
   [-ResourceGroupName] <String>
   [-Namespace] <String>
   [-Name] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzEventHubKey
   [-ResourceGroupName] <String>
   [-Namespace] <String>
   [-EventHub] <String>
   [-Name] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzEventHubKey
   [-ResourceGroupName] <String>
   [-Namespace] <String>
   [-AliasName] <String>
   [-Name] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzEventHubKey cmdlet returns Primary and Secondary connectionstrings and keys details of the specified NameSpace/Event Hubs/Alias authorization rule.

Examples

Example 1 - Namespace

PS C:\> Get-AzEventHubKey -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -AuthorizationRuleName MyAuthRuleName

Example 2 - EventHub

PS C:\> Get-AzEventHubKey -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName MyEventHubName -AuthorizationRuleName MyAuthRuleName

Gets details of Primary and Secondary connectionstrings and keys for the authorization rule `MyAuthRuleName`.

Example 3 - Alias (GeoRecovery Configuration)

PS C:\> Get-AzEventHubKey -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName MyEventHubName -AliasName MyAliasName -Name MyAuthRuleName

Gets details of Primary, Secondary, AliasPrimary and AliasSecondary connectionstrings and keys for the authorization rule `MyAuthRuleName`.

Parameters

-AliasName

Alias Name

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

-EventHub

EventHub Name

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

-Name

AuthorizationRule Name

Type:String
Aliases:AuthorizationRuleName
Position:3
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Namespace

Namespace Name

Type:String
Aliases:NamespaceName
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

Resource Group Name

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

Inputs

String

Outputs

PSListKeysAttributes