New-​Azure​Rm​Service​Bus​Subscription

Creates a subscription to the specified Service Bus topic.

Syntax

New-AzureRmServiceBusSubscription
   [-ResourceGroup] <String>
   [-NamespaceName] <String>
   [-TopicName] <String>
   [-SubscriptionName] <String>
   [-AutoDeleteOnIdle <String>]
   [-DeadLetteringOnFilterEvaluationExceptions <Boolean>]
   [-DeadLetteringOnMessageExpiration <Boolean>]
   [-EnableBatchedOperations <Boolean>]
   [-IsReadOnly <Boolean>]
   [-LockDuration <String>]
   [-MaxDeliveryCount <Int32>]
   [-RequiresSession <Boolean>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmServiceBusSubscription cmdlet creates a new subscription to the specified Service Bus topic.

Examples

Example 1

PS C:\> New-AzureRmServiceBusSubscription -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -SubscriptionName SB-TopicSubscription-Example1

Creates the subscription SB-TopicSubscription-Example1 for the specified Service Bus topic SB-Topic_exampl1.

Required Parameters

-NamespaceName

The Service Bus namespace name.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroup

The name of the resource group.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SubscriptionName

The subscription name.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-TopicName

The topic name.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-AutoDeleteOnIdle

Specifies the TimeSpan idle interval, after which the subscription is automatically deleted. The minimum duration is 5 minutes.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Confirm

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
-DeadLetteringOnFilterEvaluationExceptions

Indicates if a subscription has dead letter support on Filter evaluation exceptions.

Type:Boolean
Parameter Sets:TRUE, FALSE
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DeadLetteringOnMessageExpiration

Indicates if a subscription has deadletter support when a message expires.

Type:Boolean
Parameter Sets:TRUE, FALSE
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-EnableBatchedOperations

Indicates whether server-side batched operations are enabled.

Type:Boolean
Parameter Sets:TRUE, FALSE
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-IsReadOnly

Indicates whether the entity description is read-only

Type:Boolean
Parameter Sets:TRUE, FALSE
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-LockDuration

Specifies the lock duration time span for the subscription.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-MaxDeliveryCount

Specifies the number of maximum deliveries. A message is automatically deadlettered after this number of deliveries.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-RequiresSession

Specifies whether a subscription supports the concept of sessions.

Type:Boolean
Parameter Sets:TRUE, FALSE
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

-ResourceGroup

System.String

Inputs

-NamespaceName

System.String

Inputs

-TopicName

System.String

Inputs

-SubscriptionName

System.String

Outputs

Microsoft.Azure.Commands.ServiceBus.Models.SubscriptionAttributes

Name : SB-TopicSubscription-Example1 Location : West US AccessedAt : 1/20/2017 3:18:54 AM AutoDeleteOnIdle : 10675199.02:48:05.4775807 CountDetails : Microsoft.Azure.Management.ServiceBus.Models.MessageCountDetails CreatedAt : 1/20/2017 3:18:52 AM DefaultMessageTimeToLive : 10675199.02:48:05.4775807 DeadLetteringOnFilterEvaluationExceptions : True DeadLetteringOnMessageExpiration : False EnableBatchedOperations : True EntityAvailabilityStatus : Available IsReadOnly : LockDuration : 00:01:00 MaxDeliveryCount : 10 MessageCount : 0 RequiresSession : False Status : Active UpdatedAt : 1/20/2017 3:18:54 AM