Set-AzServiceBusSubscription
Updates a subscription description for a Service Bus topic in the specified Service Bus namespace.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Set-AzServiceBusSubscription
[-ResourceGroupName] <String>
[-Namespace] <String>
[-Topic] <String>
[-InputObject] <PSSubscriptionAttributes>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzServiceBusSubscription cmdlet updates the description of the subscription for the Service Bus topic in the specified Service Bus namespace.
Examples
Example 1
$subscriptionObj = Get-AzServiceBusSubscription -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -SubscriptionName SB-TopicSubscription-Example1
$subscriptionObj.DeadLetteringOnMessageExpiration = $True
$subscriptionObj.MaxDeliveryCount = 9
Set-AzServiceBusSubscription -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -SubscriptionObj $subscriptionObj
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
Updates the description for the specified subscription to the given topic. This example updates the DeadLetteringOnMessageExpiration property to true and MaxDeliveryCount to 9.
Parameters
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 |
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
ServiceBus Subscription definition.
| Type: | PSSubscriptionAttributes |
| Aliases: | SubscriptionObj |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Namespace Name.
| Type: | String |
| Aliases: | NamespaceName |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The name of the resource group
| Type: | String |
| Aliases: | ResourceGroup |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Topic Name.
| Type: | String |
| Aliases: | TopicName |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
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 |