Get-AzureSBAuthorizationRule

Gets Service bus authorization rules.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Service Management APIs. See the Az PowerShell module for cmdlets to manage Azure Resource Manager resources.

Syntax

Get-AzureSBAuthorizationRule
   [-Name <String>]
   [-Permission <AccessRights[]>]
   -Namespace <String>
   -EntityName <String>
   -EntityType <ServiceBusEntityType>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSBAuthorizationRule
   [-Name <String>]
   [-Permission <AccessRights[]>]
   -Namespace <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

Gets Service bus authorization rules.

Important

The Service Management REST API for Service Bus will be retired by November 1, 2021. Go to the deprecation of Azure Service Manager for more information about the retirement of the API. This Azure Service Management PowerShell cmdlet for Service Bus will no longer be supported as of November 1, 2021. Please migrate to the new Azure PowerShell cmdlets

Examples

Example 1: Get authorization rule at namespace level

PS C:\> Get-AzureSBAuthorizationRule -Namespace MyNamespace

Gets all available authorization rules at MyNamespace.

Example 2: Get authorization rule for a Queue

PS C:\> Get-AzureSBAuthorizationRule -Namespace MyNamespace -EntityName MyEntity -EntityType Queue

Gets all available authorization rules a MyEntity Queue on MyNamespace.

Example 3: Get authorization rule by name

PS C:\> Get-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace

Gets an authorization rule called MyRule on MyNamespace level.

Example 4: Get authorization rule by permission

PS C:\> Get-AzureSBAuthorizationRule -Namespace MyNamespace -Permission $("Send")

Gets all authorization rules that have send permission on namespace level.

Parameters

-EntityName

The entity name to apply rule at.

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

-EntityType

The entity type (Queue, Topic, Relay, NotificationHub).

Type:ServiceBusEntityType
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The unique authorization rule name.

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

-Namespace

The namespace name to apply the authorization rule. If no EntityName provided the rule will be on the namespace level.

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

-Permission

The authorization permissions to filter (Send, Manage, Listen). This uses exact match.

Type:AccessRights[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False