Edit

Share via


Get-AzureSBAuthorizationRule

Gets Service bus authorization rules.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

EntitySAS

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

NamespaceSAS

Get-AzureSBAuthorizationRule
    -Namespace <String>
    [-Name <String>]
    [-Permission <AccessRights[]>]
    [-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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EntitySAS
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-EntityType

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

Parameter properties

Type:ServiceBusEntityType
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EntitySAS
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Name

The unique authorization rule name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Namespace

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

Parameter properties

Type:String
Default value:None
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

-Permission

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

Parameter properties

Type:

AccessRights[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:AzureSMProfile
Default value:None
Supports wildcards:False
DontShow:False

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.