Set-AzureRmServiceBusNamespaceAuthorizationRule

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

Syntax

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

Description

The Set-AzureRmServiceBusNamespaceAuthorizationRule cmdlet updates the description for the specified authorization rule in the given Service Bus namespace.

Examples

Example 1

PS C:\> $authRuleObj = Get-AzureRmServiceBusNamespaceAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -AuthorizationRuleName AuthoRule1

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

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

Removes Manage from the access rights of the authorization rule AuthoRule1 in namespace SB-Example1.

Required Parameters

-InputObj

ServiceBus NameSpace AuthorizationRule Object.

Type:Microsoft.Azure.Commands.ServiceBus.Models.SharedAccessAuthorizationRuleAttributes
Aliases:AuthRuleObj
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

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

AuthorizationRule Name - Required if 'AuthruleObj' not specified.

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

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

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

-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/AuthorizationRules/AuthoRule1 Type : Microsoft.ServiceBus/AuthorizationRules Name : AuthoRule1 Location : Tags : Rights : {Listen, Send}