Get-AzEventHubAuthorizationRule
Gets the details of an authorization rule, or gets a list of authorization rules.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Get-AzEventHubAuthorizationRule
[-ResourceGroupName] <String>
[-Namespace] <String>
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzEventHubAuthorizationRule
[-ResourceGroupName] <String>
[-Namespace] <String>
[-Eventhub] <String>
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzEventHubAuthorizationRule
[-ResourceGroupName] <String>
[-Namespace] <String>
[-AliasName] <String>
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzEventHubAuthorizationRule cmdlet gets either the details of an authorization rule, or a list of all authorization rules for a specified Event Hub. If the name of an authorization rule is provided, the details of that single authorization rule are returned. If the name of an authorization rule is not provided, a list of all authorization rules for the specified Event Hub is returned. If (Disaster Recovery) Alias name provided, the details of authorization rule of the Namespace for Alias configured is returned.
Examples
Example 1: AuthorizationRule for namespace
Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Name MyAuthRuleName
Gets the authorization rule `MyAuthRuleName` in the namespace `MyNamespaceName`.
Example 2: AuthorizationRules for namespace
Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName MyEventHubName
Gets a list of all authorization rules in the namespace `MyNamespaceName`.
Example 3: AuthorizationRule for EventHub
Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName MyEventHubName -Name MyAuthRuleName
Gets the authorization rule `MyAuthRuleName` in the Event Hub `MyEventHubName`, which is scoped by the namespace `MyNamespaceName`.
Example 4: AuthorizationRules for EventHub
Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName MyEventHubName
Gets list authorization rules in the Event Hub `MyEventHubName`, which is scoped by the namespace `MyNamespaceName`.
Example 5: AuthorizationRule for Alias (GeoRecovery Configuration)
Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -AliasName MyAliasNameName -Name MyAuthRuleName
Gets the authorization rule `MyAuthRuleName` in the namespace `MyNamespaceName`.
Example 6: AuthorizationRules for Alias (GeoRecovery Configuration)
Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -AliasName MyAliasNameName
Gets a list of all authorization rule `MyAuthRuleName` in the namespace `MyNamespaceName`.
Parameters
Alias Name
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Eventhub Name
| Type: | String |
| Aliases: | EventHubName |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
AuthorizationRule Name
| Type: | String |
| Aliases: | AuthorizationRuleName |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Namespace Name
| Type: | String |
| Aliases: | NamespaceName |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Resource Group Name
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |