New-AzureRmServiceBusTopic
Creates a new Service Bus topic 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-AzureRmServiceBusTopic
[-ResourceGroupName] <String>
[-Namespace] <String>
[-Name] <String>
-EnablePartitioning <Boolean>
[-AutoDeleteOnIdle <String>]
[-DefaultMessageTimeToLive <String>]
[-DuplicateDetectionHistoryTimeWindow <String>]
[-EnableBatchedOperations <Boolean>]
[-EnableExpress <Boolean>]
[-MaxSizeInMegabytes <Int64>]
[-RequiresDuplicateDetection <Boolean>]
[-SupportOrdering <Boolean>]
[-SizeInBytes <Int64>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzureRmServiceBusTopic cmdlet creates a new Service Bus topic in the specified Service Bus namespace.
Examples
Example 1
PS C:\> New-AzureRmServiceBusTopic -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -EnablePartitioning $True
Name : SB-Topic_example1
Id : /subscriptions/{subscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ServiceBus/namespaces/SB-Example1/topics/SB-Topic_example1
Type : Microsoft.ServiceBus/Namespaces/Topics
AccessedAt : 1/1/0001 12:00:00 AM
AutoDeleteOnIdle : P10675199DT2H48M5.4775807S
CreatedAt : 10/11/2018 11:51:24 PM
CountDetails : Microsoft.Azure.Management.ServiceBus.Models.MessageCountDetails
DefaultMessageTimeToLive : P10675199DT2H48M5.4775807S
DuplicateDetectionHistoryTimeWindow : PT10M
EnableBatchedOperations : True
EnableExpress : False
EnablePartitioning : False
MaxSizeInMegabytes : 81920
RequiresDuplicateDetection : False
SizeInBytes : 0
Status : Active
SubscriptionCount : 0
SupportOrdering : True
UpdatedAt : 10/11/2018 11:51:24 PM
Creates a new Service Bus topic SB-Topic_exampl1
in the specified Service Bus namespace SB-Example1
.
Parameters
-AutoDeleteOnIdle
Specifies the TimeSpan idle interval after which the topic 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 |
-DefaultMessageTimeToLive
Specifies the duration after which the message expires, starting from when the message is sent to Service Bus.
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 TimeSpan structure that 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
Indicates whether server-side batched operations are enabled.
Type: | Nullable<T>[Boolean] |
Accepted values: | TRUE, FALSE |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EnableExpress
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
Specifies whether to enable the topic to be partitioned across multiple message brokers.
Type: | Nullable<T>[Boolean] |
Accepted values: | TRUE, FALSE |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MaxSizeInMegabytes
The maximum size of the topic in megabytes, which is the size of memory allocated for the topic.
Type: | Nullable<T>[Int64] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Topic Name.
Type: | String |
Aliases: | TopicName |
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
Indicates whether the topic requires duplication 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
Specifies the size of the topic in bytes.
Type: | Nullable<T>[Int64] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SupportOrdering
Indicates whether the topic supports ordering.
Type: | Nullable<T>[Boolean] |
Accepted values: | TRUE, FALSE |
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.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]