New-AzureRmServiceBusQueue
Creates 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
New-AzureRmServiceBusQueue
[-ResourceGroupName] <String>
[-Namespace] <String>
[-Name] <String>
[-EnablePartitioning <Boolean>]
[-LockDuration <String>]
[-AutoDeleteOnIdle <String>]
[-DefaultMessageTimeToLive <String>]
[-DuplicateDetectionHistoryTimeWindow <String>]
[-DeadLetteringOnMessageExpiration <Boolean>]
[-EnableBatchedOperations]
[-EnableExpress <Boolean>]
[-MaxDeliveryCount <Int32>]
[-MaxSizeInMegabytes <Int64>]
[-MessageCount <Int64>]
[-RequiresDuplicateDetection <Boolean>]
[-RequiresSession <Boolean>]
[-SizeInBytes <Int64>]
[-ForwardTo <String>]
[-ForwardDeadLetteredMessagesTo <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzureRmServiceBusQueue cmdlet creates a Service Bus queue in the specified Service Bus namespace.
Examples
Example 1
PS C:\> New-AzureRmServiceBusQueue -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -QueueName SB-Queue_example1 -EnablePartitioning $True
Id : /subscriptions/{subscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ServiceBus/namespaces/SB-Example1/queues/SB-Queue_example1
Name : SB-Queue_example1
LockDuration : PT1M
AccessedAt : 1/1/0001 12:00:00 AM
AutoDeleteOnIdle : P10675199DT2H48M5.4775807S
CreatedAt : 10/11/2018 12:37:11 AM
DefaultMessageTimeToLive : P10675199DT2H48M5.4775807S
DuplicateDetectionHistoryTimeWindow : PT10M
DeadLetteringOnMessageExpiration : False
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 : 10/11/2018 12:37:12 AM
ForwardTo :
ForwardDeadLetteredMessagesTo :
EnableBatchedOperations : False
Creates a new Service Bus queue SB-Queue_example1
in the specified Service Bus namespace SB-Example1
.
Parameters
-AutoDeleteOnIdle
Specifies the TimeSpan idle interval, after which the queue is automatically deleted. The minimum duration is 5 minutes.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeadLetteringOnMessageExpiration
Dead Lettering On Message Expiration
Type: | Nullable<T>[Boolean] |
Accepted values: | TRUE, FALSE |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultMessageTimeToLive
Timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. For Standard = Timespan.Max and Basic = 14 dyas
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
-DuplicateDetectionHistoryTimeWindow
Specifies the duplicate detection history time window, a TimeSpan valuethat defines the duration of the duplicate detection history. The default value is 10 minutes.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EnableBatchedOperations
Enable Batched Operations - value that indicates whether server-side batched operations are enabled
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableExpress
EnableExpress - a value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.
Type: | Nullable<T>[Boolean] |
Accepted values: | TRUE, FALSE |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EnablePartitioning
EnablePartitioning
Type: | Nullable<T>[Boolean] |
Accepted values: | TRUE, FALSE |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ForwardDeadLetteredMessagesTo
Queue/Topic name to forward the Dead Letter message
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ForwardTo
Queue/Topic name to forward the messages
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-LockDuration
Lock Duration
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MaxDeliveryCount
MaxDeliveryCount - the maximum delivery count. A message is automatically deadlettered after this number of deliveries.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MaxSizeInMegabytes
MaxSizeInMegabytes - the maximum size of the queue in megabytes, which is the size of memory allocated for the queue.
Type: | Nullable<T>[Int64] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MessageCount
MessageCount - the number of messages in the queue
Type: | Nullable<T>[Int64] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Queue Name
Type: | String |
Aliases: | QueueName |
Position: | 2 |
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 |
-RequiresDuplicateDetection
RequiresDuplicateDetection - a value that indicates whether the queue supports the concept of session
Type: | Nullable<T>[Boolean] |
Accepted values: | TRUE, FALSE |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RequiresSession
RequiresSession - the value indicating if this queue requires duplicate detection
Type: | Nullable<T>[Boolean] |
Accepted values: | TRUE, FALSE |
Position: | Named |
Default value: | None |
Required: | False |
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 |
-SizeInBytes
SizeInBytes - the size of the queue in bytes
Type: | Nullable<T>[Int64] |
Position: | Named |
Default value: | None |
Required: | False |
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: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Nullable<T>[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
Nullable<T>[[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]