New-​Azure​SB​Authorization​Rule

Creates new Service Bus authorization rule.

Syntax

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

Description

The New-AzureSBAuthorizationRule cmdlet creates a Service Bus authorization rule.

Examples

Example 1: Create an authorization rule with generated primary key

PS C:\> New-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace -Permission $("Send")

Creates new authorization rule on namespace level with Send permission.

Example 2: Creates an authorization rule by providing the primary key

PS C:\> New-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace -Permission $("Manage", "Listen", "Send") -EntityName MyEntity -EntityType Queue -PrimaryKey P+lL/Mnd2Z9sj5hwMrRyAxQDdX8RHfbdqU2eIAqs1rc=

Creates new authorization rule on MyEntity Queue level with all permissions.

Required Parameters

-EntityName

Specifies the entity name to apply rule at.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EntityType

Specifies the entity type. Valid values are:

  • Queue
  • Topic
  • Relay
  • NotificationHub
Type:ServiceBusEntityType
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the unique authorization rule name.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Namespace

Specifies 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
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Permission

The authorization permissions (Send, Manage, Listen).

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

Specifies the Shared Access Signature primary key. Will be generated if not provided.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
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
Accept pipeline input:False
Accept wildcard characters:False
-SecondaryKey

Specifies the Shared Access Signature secondary key.

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