New-AzEventHubAuthorizationRule
Creates a new Event Hubs authorization rule for namespace or eventhub.
Syntax
NamespaceAuthorizationRuleSet (Default)
New-AzEventHubAuthorizationRule
[-ResourceGroupName] <String>
[-Namespace] <String>
[-Name] <String>
-Rights <String[]>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
EventhubAuthorizationRuleSet
New-AzEventHubAuthorizationRule
[-ResourceGroupName] <String>
[-Namespace] <String>
[-EventHub] <String>
[-Name] <String>
-Rights <String[]>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzEventHubAuthorizationRule cmdlet creates a new Event Hubs authorization rule.
Examples
Example 1
PS C:\> New-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -AuthorizationRuleName MyAuthRuleName -Rights @("Listen","Send")
Creates an authorization rule `MyAuthRuleName` granting Listen and Send rights to the namespace `MyNamespaceName`, with resource group `MyResourceGroupName`.
Example 2
PS C:\> New-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName MyEventHubName -AuthorizationRuleName MyAuthRuleName -Rights @("Listen","Send")
Creates an authorization rule `MyAuthRuleName` granting Listen and Send rights to the Event Hub `MyEventHubName` in namespace `MyNamespaceName`, with resource group `MyResourceGroupName`.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EventHub
EventHub Name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: EventHubName
Parameter sets
EventhubAuthorizationRuleSet
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Name
AuthorizationRule Name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AuthorizationRuleName
Parameter sets
(All)
Position: 3
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Namespace
Namespace Name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: NamespaceName
Parameter sets
(All)
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceGroupName
Resource Group Name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Rights
Rights, e.g.
"Listen","Send","Manage"
Parameter properties
Type: String [ ]
Default value: None
Accepted values: Listen, Send, Manage
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs