Set-AzureRmServiceBusSubscription

Updates a subscription description for a Service Bus topic in the specified Service Bus namespace.

Syntax

Set-AzureRmServiceBusSubscription
   [-ResourceGroupName] <String>
   [-Namespace] <String>
   [-Topic] <String>
   [-InputObject] <SubscriptionAttributes>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzureRmServiceBusSubscription cmdlet updates the description of the subscription for the Service Bus topic in the specified Service Bus namespace.

Examples

Example 1

PS C:\> $subscriptionObj = Get-AzureRmServiceBusSubscription -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -SubscriptionName SB-TopicSubscription-Example1

PS C:\> $subscriptionObj.DeadLetteringOnMessageExpiration = $True
PS C:\> $subscriptionObj.MaxDeliveryCount = 9

PS C:\> Set-AzureRmServiceBusSubscription -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -SubscriptionObj $subscriptionObj

Updates the description for the specified subscription to the given topic. This example updates the DeadLetteringOnMessageExpiration property to true and MaxDeliveryCount to 9.

Required Parameters

-InputObject

ServiceBus Subscription definition.

Type:Microsoft.Azure.Commands.ServiceBus.Models.SubscriptionAttributes
Aliases:SubscriptionObj
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Namespace

Namespace Name.

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

The name of the resource group

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

Topic Name.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.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

-SubscriptionObj

Microsoft.Azure.Commands.ServiceBus.Models.SubscriptionAttributes

Outputs

Microsoft.Azure.Commands.ServiceBus.Models.SubscriptionAttributes

Name : SB-TopicSubscription-Example1 AccessedAt : 1/1/0001 12:00:00 AM AutoDeleteOnIdle : 10675199.02:48:05.4775807 CountDetails : CreatedAt : 1/20/2017 9:59:15 PM DefaultMessageTimeToLive : 10675199.02:48:05.4775807 DeadLetteringOnMessageExpiration : True EnableBatchedOperations : True LockDuration : 00:01:00 MaxDeliveryCount : 9 MessageCount : 0 RequiresSession : False Status : Active UpdatedAt : 1/20/2017 9:59:15 PM