Set-​Azure​Rm​Service​Bus​Topic​Authorization​Rule

Updates the specified authorization rule description for the given Service Bus topic.

Syntax

Set-AzureRmServiceBusTopicAuthorizationRule
   [-ResourceGroup] <String>
   [-NamespaceName] <String>
   [-AuthRuleObj] <SharedAccessAuthorizationRuleAttributes>
   [-TopicName] <String>
   [[-AuthorizationRuleName] <String>]
   [[-Rights] <String[]>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The Set-AzureRmServiceBusTopicAuthorizationRule cmdlet updates the description for the specified authorization rule of the given Service Bus topic.

Examples

Example 1

PS C:\> $authRuleObj = Get-AzureRmServiceBusTopicAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -AuthorizationRuleName SBTopicAuthoRule1

PS C:\> $authRuleObj.Rights.Add("Manage")

PS C:\> Set-AzureRmServiceBusTopicAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -AuthRuleObj $authRuleObj

Adds Manage to the access rights of the authorization rule SBTopicAuthoRule1 on topic SB-Topic_exampl1.

Required Parameters

-AuthRuleObj

The Service Bus topic authorization rule object.

Type:SharedAccessAuthorizationRuleAttributes
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-NamespaceName

The Service Bus namespace name.

Type:String
Position:1
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
-TopicName

The Service Bus topic name.

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

Optional Parameters

-AuthorizationRuleName

The authorization rule name. Required if -AuthruleObj is not specified.

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

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Rights

Rights; for example, @("Listen","Send","Manage"). Required if -AuthruleObj is not specified.

Type:String[]
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf

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

Type: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

-TopicName

System.String

Inputs

-AuthRuleObj

Microsoft.Azure.Commands.ServiceBus.Models.SharedAccessAuthorizationRuleAttributes

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/authorization Rules/SBTopicAuthoRule1 Type : Microsoft.ServiceBus/AuthorizationRules Name : SBTopicAuthoRule1 Location : West US Tags : Rights : {Listen, Send, Manage}