New-AzureRmServiceBusTopicAuthorizationRule

Creates a new authorization rule for the specified Service Bus topic.

Syntax

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

Description

The New-AzureRmServiceBusTopicAuthorizationRule cmdlet creates a new authorization rule for the specified Service Bus topic.

Examples

Example 1

PS C:\> New-AzureRmServiceBusTopicAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -AuthorizationRuleName SBTopicAuthoRule1 -Rights @("Listen","Send")

Creates authorization rule SBTopicAuthoRule1 with Listen and Send rights for the topic SB-Topic_exampl1.

Required Parameters

-Name

AuthorizationRule Name.

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

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
-Topic

Topic Name.

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

Inputs

-ResourceGroup

System.String

Inputs

-NamespaceName

System.String

Inputs

-TopicName

System.String

Inputs

-AuthorizationRuleName

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/topics/SB-Topic_exampl1/authorizati onRules/SBTopicAuthoRule1 Type : Microsoft.ServiceBus/AuthorizationRules Name : SBTopicAuthoRule1 Location : West US Tags : Rights : {Listen, Send}