你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzEventHubAuthorizationRule
获取授权规则的详细信息,或获取授权规则的列表。
语法
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>]
说明
Get-AzEventHubAuthorizationRule cmdlet 获取授权规则的详细信息,或指定事件中心的所有授权规则的列表。 如果提供了授权规则的名称,则会返回该单个授权规则的详细信息。 如果未提供授权规则的名称,则返回指定事件中心的所有授权规则的列表。 如果提供了(灾难恢复)别名,则返回配置的别名Namespace授权规则的详细信息。
示例
示例 1.0 - 命名空间的 AuthorizationRule
PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Name MyAuthRuleName
获取命名空间“MyNamespaceName”中的授权规则“MyAuthRuleName”。
示例 1.1 - 命名空间的 AuthorizationRules
PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName MyEventHubName
获取命名空间“MyNamespaceName”中所有授权规则的列表。
示例 2.0 - EventHub 的 AuthorizationRule
PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName MyEventHubName -Name MyAuthRuleName
获取事件中心“MyEventHubName”中的授权规则“MyAuthRuleName”,该规则的范围由命名空间“MyNamespaceName”限定。
示例 2.1 - EventHub 的 AuthorizationRules
PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName MyEventHubName
获取事件中心“MyEventHubName”中的列表授权规则,该规则的范围由命名空间“MyNamespaceName”限定。
示例 3.0 - Alias 的 AuthorizationRule (GeoRecovery Configuration)
PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -AliasName MyAliasNameName -Name MyAuthRuleName
获取命名空间“MyNamespaceName”中的授权规则“MyAuthRuleName”。
示例 3.1 -AuthorizationRules for Alias (GeoRecovery Configuration)
PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -AliasName MyAliasNameName
获取命名空间“MyNamespaceName”中所有授权规则“MyAuthRuleName”的列表。
参数
-AliasName
别名
类型: | String |
Position: | 2 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Eventhub
Eventhub 名称
类型: | String |
别名: | EventHubName |
Position: | 2 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Name
AuthorizationRule 名称
类型: | String |
别名: | AuthorizationRuleName |
Position: | 3 |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Namespace
命名空间名称
类型: | String |
别名: | NamespaceName |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
资源组名称
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |