Set-AzureRmServiceBusQueue
Updates the description of a Service Bus queue in the specified Service Bus namespace.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Set-AzureRmServiceBusQueue
[-ResourceGroupName] <String>
[-Namespace] <String>
[-Name] <String>
[-InputObject] <PSQueueAttributes>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzureRmServiceBusQueue cmdlet updates the description for the Service Bus queue in the specified Service Bus namespace.
Examples
Example 1
PS C:\> $QueueObj = Get-AzureRmServiceBusQueue -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -QueueName SB-Queue_example1
PS C:\> $QueueObj.DeadLetteringOnMessageExpiration = $True
PS C:\> $QueueObj.SupportOrdering = $True
PS C:\> Set-AzureRmServiceBusQueue -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -QueueName SB-Queue_example1 -QueueObj $QueueObj
Id : /subscriptions/{subscriptionId}/resourceGroups/{ResourceGroupName}/Default-ServiceBus-WestUS/providers/Microsoft.ServiceBus/namespaces/SB-Example1/queues/SB-Queue_exampl1
Name : SB-Queue_exampl1
LockDuration : PT1M
AccessedAt : 1/1/0001 12:00:00 AM
AutoDeleteOnIdle : P10675199DT2H48M5.4775807S
CreatedAt : 1/1/0001 12:00:00 AM
DefaultMessageTimeToLive : P10675199DT2H48M5.4775807S
DuplicateDetectionHistoryTimeWindow : PT10M
DeadLetteringOnMessageExpiration : True
EnableExpress : False
EnablePartitioning : False
MaxDeliveryCount : 10
MaxSizeInMegabytes : 81920
MessageCount : 0
CountDetails : Microsoft.Azure.Management.ServiceBus.Models.MessageCountDetails
RequiresDuplicateDetection : False
RequiresSession : False
SizeInBytes : 0
Status : Active
UpdatedAt : 1/1/0001 12:00:00 AM
ForwardTo :
ForwardDeadLetteredMessagesTo :
EnableBatchedOperations : False
Updates the specified queue with a new description in the specified namespace. This example updates the DeadLetteringOnMessageExpiration property to true and SupportOrdering to true.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
ServiceBus definition.
Type: | PSQueueAttributes |
Aliases: | QueueObj |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Queue Name.
Type: | String |
Aliases: | QueueName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Namespace
Namespace Name.
Type: | String |
Aliases: | NamespaceName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group
Type: | String |
Aliases: | ResourceGroup |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |