Set-AzureSBAuthorizationRule
Updates existing Service Bus authorization rule.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
EntitySAS
Set-AzureSBAuthorizationRule
-Name <String>
-Namespace <String>
-EntityName <String>
-EntityType <ServiceBusEntityType>
[-Permission <AccessRights[]>]
[-PrimaryKey <String>]
[-SecondaryKey <String>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
NamespaceSAS
Set-AzureSBAuthorizationRule
-Name <String>
-Namespace <String>
[-Permission <AccessRights[]>]
[-PrimaryKey <String>]
[-SecondaryKey <String>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
Updates existing Service Bus authorization rule.
Important
The Service Management REST API for Service Bus will be retired by November 1, 2021. Go to the deprecation of Azure Service Manager for more information about the retirement of the API. This Azure Service Management PowerShell cmdlet for Service Bus will no longer be supported as of November 1, 2021. Please migrate to the new Azure PowerShell cmdlets
Examples
Example 1: Renew primary key for authorization rule at namespace level
PS C:\> Set-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace -Permission $("Send")
The primary key is renewed.
Example 2: Update authorization rule permission
PS C:\> Set-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace -Permission $("Listen", "Send") -EntityName MyEntity -EntityType Queue
Updates the permissions.
Parameters
-EntityName
The entity name to apply rule at.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
EntitySAS
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-EntityType
The entity type (Queue, Topic, Relay, NotificationHub).
Parameter properties
Type: | ServiceBusEntityType |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
EntitySAS
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Name
The unique authorization rule name.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Namespace
The namespace name to apply the authorization rule. If no EntityName provided the rule will be on the namespace level.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Permission
The authorization permissions (Send, Manage, Listen).
Parameter properties
Type: | AccessRights[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PrimaryKey
The Shared Access Signature primary key. Will be generated if not provided.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | AzureSMProfile |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SecondaryKey
The Shared Access Signature secondary key.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.