Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
New-AzServiceBusTopic
- Module:
- Az.ServiceBus Module
create a topic in the specified namespace.
Syntax
CreateExpanded (Default)
New-AzServiceBusTopic
-Name <String>
-NamespaceName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-AutoDeleteOnIdle <TimeSpan>]
[-DefaultMessageTimeToLive <TimeSpan>]
[-DuplicateDetectionHistoryTimeWindow <TimeSpan>]
[-EnableBatchedOperations]
[-EnableExpress]
[-EnablePartitioning]
[-MaxMessageSizeInKilobytes <Int64>]
[-MaxSizeInMegabytes <Int32>]
[-RequiresDuplicateDetection]
[-Status <String>]
[-SupportOrdering]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaIdentityNamespaceExpanded
New-AzServiceBusTopic
-Name <String>
-NamespaceInputObject <IServiceBusIdentity>
[-AutoDeleteOnIdle <TimeSpan>]
[-DefaultMessageTimeToLive <TimeSpan>]
[-DuplicateDetectionHistoryTimeWindow <TimeSpan>]
[-EnableBatchedOperations]
[-EnableExpress]
[-EnablePartitioning]
[-MaxMessageSizeInKilobytes <Int64>]
[-MaxSizeInMegabytes <Int32>]
[-RequiresDuplicateDetection]
[-Status <String>]
[-SupportOrdering]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaIdentityNamespace
New-AzServiceBusTopic
-Name <String>
-NamespaceInputObject <IServiceBusIdentity>
-Parameter <ISbTopic>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
create a topic in the specified namespace.
Examples
Example 1: Creates a new ServiceBus topic
New-AzServiceBusTopic -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myTopic -DefaultMessageTimeToLive (New-TimeSpan -Days 18) -EnableBatchedOperations
AccessedAt : 1/1/0001 12:00:00 AM
AutoDeleteOnIdle : 10675199.02:48:05.4775807
CountDetailActiveMessageCount : 0
CountDetailDeadLetterMessageCount : 0
CountDetailScheduledMessageCount : 0
CountDetailTransferDeadLetterMessageCount : 0
CountDetailTransferMessageCount : 0
CreatedAt : 1/1/0001 12:00:00 AM
DefaultMessageTimeToLive : 18.00:00:00
DuplicateDetectionHistoryTimeWindow : 00:10:00
EnableBatchedOperations : True
EnableExpress : False
EnablePartitioning : False
Id : /subscriptions/000000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace/topics/myTopic
Location : westus
MaxMessageSizeInKilobytes : 1024
MaxSizeInMegabytes : 1024
Name : myTopic
RequiresDuplicateDetection : False
ResourceGroupName : myResourceGroup
SizeInByte : 0
Status : Active
SubscriptionCount : 0
SupportOrdering : True
Creates a new ServiceBus topic myTopic within namespace myNamespace.
Parameters
-AutoDeleteOnIdle
Idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes.
Parameter properties
| Type: | TimeSpan |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultMessageTimeToLive
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.
Parameter properties
| Type: | TimeSpan |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
| Type: | PSObject |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzureRMContext, AzureCredential |
Parameter sets
-DuplicateDetectionHistoryTimeWindow
Defines the duration of the duplicate detection history. The default value is 10 minutes.
Parameter properties
| Type: | TimeSpan |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-EnableBatchedOperations
Value that indicates whether server-side batched operations are enabled.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-EnableExpress
Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-EnablePartitioning
Value that indicates whether the topic to be partitioned across multiple message brokers is enabled.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-MaxMessageSizeInKilobytes
Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024.
Parameter properties
| Type: | Int64 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-MaxSizeInMegabytes
Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
The topic name.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | TopicName |
Parameter sets
-NamespaceInputObject
Identity Parameter
Parameter properties
| Type: | IServiceBusIdentity |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-NamespaceName
The namespace name
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Parameter
Description of topic resource.
Parameter properties
| Type: | ISbTopic |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-RequiresDuplicateDetection
Value indicating if this topic requires duplicate detection.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
Name of the Resource group within the Azure subscription.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Status
Enumerates the possible values for the status of a messaging entity.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SubscriptionId
Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Parameter properties
| Type: | String |
| Default value: | (Get-AzContext).Subscription.Id |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SupportOrdering
Value that indicates whether the topic supports ordering.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
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.
Inputs
ISbTopic
IServiceBusIdentity
Outputs
ISbTopic
Related Links
Azure PowerShell
Feedback
Was this page helpful?
