Set-AzServiceBusRule
Updates a ServiceBus Rule
Syntax
Set-AzServiceBusRule
-Name <String>
-TopicName <String>
-SubscriptionName <String>
-NamespaceName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-SqlExpression <String>]
[-SqlFilterRequiresPreprocessing]
[-ContentType <String>]
[-CorrelationId <String>]
[-Label <String>]
[-MessageId <String>]
[-CorrelationFilterProperty <Hashtable>]
[-ReplyTo <String>]
[-ReplyToSessionId <String>]
[-CorrelationFilterRequiresPreprocessing]
[-SessionId <String>]
[-To <String>]
[-FilterType <String>]
[-ActionRequiresPreprocessing]
[-ActionSqlExpression <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzServiceBusRule
-InputObject <IServiceBusIdentity>
[-SqlExpression <String>]
[-SqlFilterRequiresPreprocessing]
[-ContentType <String>]
[-CorrelationId <String>]
[-Label <String>]
[-MessageId <String>]
[-CorrelationFilterProperty <Hashtable>]
[-ReplyTo <String>]
[-ReplyToSessionId <String>]
[-CorrelationFilterRequiresPreprocessing]
[-SessionId <String>]
[-To <String>]
[-FilterType <String>]
[-ActionRequiresPreprocessing]
[-ActionSqlExpression <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Updates a ServiceBus Rule
Examples
Example 1: Update a Correlation Filter
Set-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name myCorrelationRule -ContentType updatedContentType -ReplyToSessionId updatedReplyToSessionId
ActionCompatibilityLevel :
ActionRequiresPreprocessing :
ActionSqlExpression :
ContentType : updatedContentType
CorrelationFilterProperty : {
"c": "d",
"a": "b"
}
CorrelationFilterRequiresPreprocessing :
CorrelationId : correlationid
FilterType : CorrelationFilter
Id : /subscriptions/000000000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace/topics/myTopic/subscriptions/mySubscription/rules/myCorrelationRule
Label : label
Location : westus
MessageId : messageid
Name : myCorrelationRule
ReplyTo : replyto
ReplyToSessionId : updatedReplyToSessionId
ResourceGroupName : myResourceGroup
SessionId : sessionid
SqlExpression :
SqlFilterCompatibilityLevel :
Update ContentType
and ReplyToSessionId
parameters of a correlation filter myCorrelationRule
in ServiceBus subscription mySubscription
.
Example 2: Update an Sql Filter using InputObject parameter set
$rule = Get-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name mySqlRule
Set-AzServiceBusRule -InputObject $rule -SqlExpression 5=3
ActionCompatibilityLevel : 20
ActionRequiresPreprocessing :
ActionSqlExpression : SET a=b
ContentType :
CorrelationFilterProperty : {
}
CorrelationFilterRequiresPreprocessing :
CorrelationId :
FilterType : SqlFilter
Id : /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace/topics/myTopic/subscriptions/mySubscription/rules/mySqlRule
Label :
Location : westus
MessageId :
Name : mySqlRule
ReplyTo :
ReplyToSessionId :
ResourceGroupName : myResourceGroup
SessionId :
SqlExpression : 5=3
SqlFilterCompatibilityLevel : 20
SqlFilterRequiresPreprocessing :
Updating SqlExpression of SqlFilter mySqlRule
using InputObject parameter set.
Parameters
-ActionRequiresPreprocessing
Value that indicates whether the rule action requires preprocessing.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ActionSqlExpression
SQL expression. e.g. MyProperty='ABC'
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
Run the command as a job
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
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 |
-ContentType
Content type of the message.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CorrelationFilterProperty
dictionary object for custom filters
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CorrelationFilterRequiresPreprocessing
Value that indicates whether the rule action requires preprocessing.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CorrelationId
Identifier of the correlation.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FilterType
Filter type that is evaluated against a BrokeredMessage.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IServiceBusIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Label
Application specific label.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MessageId
Identifier of the message.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
The name of the Rule.
Type: | String |
Aliases: | RuleName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NamespaceName
The name of ServiceBus namespace
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NoWait
Run the command asynchronously
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplyTo
Address of the queue to reply to.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplyToSessionId
Session identifier to reply to.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group. The name is case insensitive.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SessionId
Session identifier.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SqlExpression
SQL expression. e.g. MyProperty='ABC'
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SqlFilterRequiresPreprocessing
Value that indicates whether the rule action requires preprocessing.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
The ID of the target subscription.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionName
The name of the SubscriptionName.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-To
Address to send to.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TopicName
The name of the Topic.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
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 |