New-AzServiceBusRule
create a new rule and create an existing rule
Syntax
CreateExpanded (Default)
New-AzServiceBusRule
-Name <String>
-NamespaceName <String>
-ResourceGroupName <String>
-SubscriptionName <String>
-TopicName <String>
[-SubscriptionId <String>]
[-ActionRequiresPreprocessing]
[-ActionSqlExpression <String>]
[-ContentType <String>]
[-CorrelationFilterProperty <Hashtable>]
[-CorrelationFilterRequiresPreprocessing]
[-CorrelationId <String>]
[-FilterType <String>]
[-Label <String>]
[-MessageId <String>]
[-ReplyTo <String>]
[-ReplyToSessionId <String>]
[-SessionId <String>]
[-SqlExpression <String>]
[-SqlFilterRequiresPreprocessing]
[-To <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaIdentityTopicExpanded
New-AzServiceBusRule
-Name <String>
-SubscriptionName <String>
-TopicInputObject <IServiceBusIdentity>
[-ActionRequiresPreprocessing]
[-ActionSqlExpression <String>]
[-ContentType <String>]
[-CorrelationFilterProperty <Hashtable>]
[-CorrelationFilterRequiresPreprocessing]
[-CorrelationId <String>]
[-FilterType <String>]
[-Label <String>]
[-MessageId <String>]
[-ReplyTo <String>]
[-ReplyToSessionId <String>]
[-SessionId <String>]
[-SqlExpression <String>]
[-SqlFilterRequiresPreprocessing]
[-To <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaIdentityTopic
New-AzServiceBusRule
-Name <String>
-SubscriptionName <String>
-TopicInputObject <IServiceBusIdentity>
-Parameter <IRule>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaIdentityNamespaceExpanded
New-AzServiceBusRule
-Name <String>
-SubscriptionName <String>
-TopicName <String>
-NamespaceInputObject <IServiceBusIdentity>
[-ActionRequiresPreprocessing]
[-ActionSqlExpression <String>]
[-ContentType <String>]
[-CorrelationFilterProperty <Hashtable>]
[-CorrelationFilterRequiresPreprocessing]
[-CorrelationId <String>]
[-FilterType <String>]
[-Label <String>]
[-MessageId <String>]
[-ReplyTo <String>]
[-ReplyToSessionId <String>]
[-SessionId <String>]
[-SqlExpression <String>]
[-SqlFilterRequiresPreprocessing]
[-To <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaIdentityNamespace
New-AzServiceBusRule
-Name <String>
-SubscriptionName <String>
-TopicName <String>
-NamespaceInputObject <IServiceBusIdentity>
-Parameter <IRule>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaIdentitySubscriptionExpanded
New-AzServiceBusRule
-Name <String>
-SubscriptionInputObject <IServiceBusIdentity>
[-ActionRequiresPreprocessing]
[-ActionSqlExpression <String>]
[-ContentType <String>]
[-CorrelationFilterProperty <Hashtable>]
[-CorrelationFilterRequiresPreprocessing]
[-CorrelationId <String>]
[-FilterType <String>]
[-Label <String>]
[-MessageId <String>]
[-ReplyTo <String>]
[-ReplyToSessionId <String>]
[-SessionId <String>]
[-SqlExpression <String>]
[-SqlFilterRequiresPreprocessing]
[-To <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaIdentitySubscription
New-AzServiceBusRule
-Name <String>
-SubscriptionInputObject <IServiceBusIdentity>
-Parameter <IRule>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
create a new rule and create an existing rule
Examples
Example 1: Create a Correlation Filter
New-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name myCorrelationRule -FilterType CorrelationFilter -ContentType contenttype -CorrelationFilterProperty @{a='b';c='d'} -SessionId sessionid -CorrelationId correlationid -MessageId messageid -Label label -ReplyTo replyto -ReplyToSessionId replytosessionid
ActionCompatibilityLevel :
ActionRequiresPreprocessing :
ActionSqlExpression :
ContentType : contenttype
CorrelationFilterProperty : {
"c": "d",
"a": "b"
}
CorrelationFilterRequiresPreprocessing :
CorrelationId : correlationid
FilterType : CorrelationFilter
Id : /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace/topics/myTopic/subscriptions/mySubscription/rules/myCorrelationRule
Label : label
Location : westus
MessageId : messageid
Name : myCorrelationRule
ReplyTo : replyto
ReplyToSessionId : replytosessionid
ResourceGroupName : myResourceGroup
SessionId : sessionid
SqlExpression :
SqlFilterCompatibilityLevel :
Create a correlation filter myCorrelationRule
in ServiceBus subscription mySubscription
.
Example 2: Create a Sql Filter
New-AzServiceBusRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName myTopic -SubscriptionName mySubscription -Name mySqlRule -FilterType SqlFilter -SqlExpression 3=2 -ActionSqlExpression "SET a=b"
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 : 3=2
SqlFilterCompatibilityLevel : 20
SqlFilterRequiresPreprocessing :
Create a sql filter mySqlRule
in ServiceBus subscription mySubscription
.
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
Position: Named
Mandatory: False
Value from pipeline: False
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The rule name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: RuleName
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespace
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-NamespaceName
The namespace name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Parameter
Description of Rule Resource.
Parameter properties
Type: IRule
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateViaIdentityTopic
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespace
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscription
Position: Named
Mandatory: True
Value from pipeline: True
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Name of the Resource group within the Azure subscription.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateExpanded
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SqlExpression
The SQL expression.
e.g.
MyProperty='ABC'
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
Subscription credentials that uniquely identify a Microsoft Azure subscription.
The subscription ID forms part of the URI for every service call.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
CreateViaIdentitySubscriptionExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscription
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionName
The subscription name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopic
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespace
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
CreateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentitySubscriptionExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
CreateViaIdentityTopicExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityTopic
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-TopicName
The topic name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
CreateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespaceExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CreateViaIdentityNamespace
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