Set-AzServiceBusQueue
Updates the description of a Service Bus queue in the specified Service Bus namespace.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Set-AzServiceBusQueue
[-ResourceGroupName] <String>
[-Namespace] <String>
[-Name] <String>
[-InputObject] <PSQueueAttributes>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzServiceBusQueue cmdlet updates the description for the Service Bus queue in the specified Service Bus namespace.
Examples
Example 1
$QueueObj = Get-AzServiceBusQueue -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -QueueName SB-Queue_example1
$QueueObj.DeadLetteringOnMessageExpiration = $True
$QueueObj.SupportOrdering = $True
Set-AzServiceBusQueue -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
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 |
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
ServiceBus definition.
| Type: | PSQueueAttributes |
| Aliases: | QueueObj |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Queue Name.
| Type: | String |
| Aliases: | QueueName |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Namespace Name.
| Type: | String |
| Aliases: | NamespaceName |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The name of the resource group
| Type: | String |
| Aliases: | ResourceGroup |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
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 |