Set-AzServiceBusRule
Updates a ServiceBus Rule
Syntax
SetExpanded (Default)
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>]
SetViaIdentityExpanded
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
.
$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.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ActionSqlExpression
SQL expression.
e.g.
MyProperty='ABC'
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AsJob
Run the command as a job
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ContentType
Content type of the message.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CorrelationFilterProperty
dictionary object for custom filters
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CorrelationFilterRequiresPreprocessing
Value that indicates whether the rule action requires preprocessing.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CorrelationId
Identifier of the correlation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FilterType
Filter type that is evaluated against a BrokeredMessage.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity parameter.
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
SetViaIdentityExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Label
Application specific label.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MessageId
Identifier of the message.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the Rule.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: RuleName
Parameter sets
SetExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NamespaceName
The name of ServiceBus namespace
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NoWait
Run the command asynchronously
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReplyTo
Address of the queue to reply to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReplyToSessionId
Session identifier to reply to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SessionId
Session identifier.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SqlExpression
SQL expression.
e.g.
MyProperty='ABC'
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SqlFilterRequiresPreprocessing
Value that indicates whether the rule action requires preprocessing.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The ID of the target subscription.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
SetExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionName
The name of the SubscriptionName.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-To
Address to send to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TopicName
The name of the Topic.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
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 .
Outputs