New-AzureRmServiceBusNamespaceAuthorizationRule

Creates a new authorization rule for the specified Service Bus namespace

Syntax

New-AzureRmServiceBusNamespaceAuthorizationRule
   [-ResourceGroup] <String>
   -Namespace <String>
   -Name <String>
   [-Rights] <String[]>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzureRmServiceBusNamespaceAuthorizationRule cmdlet creates a new authorization rule for the specified Service Bus namespace.

Examples

Example 1

PS C:\> New-AzureRmServiceBusNamespaceAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -AuthorizationRuleName AuthoRule1 -Rights @("Listen","Send")

Creates AuthoRule1 with Listen and Send rights for the namespace SB-Example1.

Required Parameters

-Name

AuthorizationRule Name.

Type:String
Aliases:AuthorizationRuleName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Namespace

ServiceBus Namespace Name.

Type:String
Aliases:NamespaceName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroup

The name of the resource group.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Rights

The Rights; for example, @("Listen","Send","Manage")

Type:System.String[]
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

-ResourceGroup

System.String

Inputs

-NamespaceName

System.String

Inputs

-AuthorizationRuleName

System.String

Inputs

-Rights

System.String []

Outputs

Microsoft.Azure.Commands.ServiceBus.Models.SharedAccessAuthorizationRuleAttributes

Id : /subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.ServiceBus/namespaces/SB-Example1/AuthorizationRules/AuthoRule1 Type : Microsoft.ServiceBus/AuthorizationRules Name : AuthoRule1 Location : Tags : Rights : {Listen, Send}