Düzenle

Aracılığıyla paylaş


New-AzServiceBusRule

Create a new rule and updates an existing rule

Syntax

New-AzServiceBusRule
   -Name <String>
   -NamespaceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -SubscriptionName <String>
   -TopicName <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>]
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>]
New-AzServiceBusRule
   -Name <String>
   -SubscriptionName <String>
   -TopicInputObject <IServiceBusIdentity>
   -Parameter <IRule>
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
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>]
New-AzServiceBusRule
   -Name <String>
   -SubscriptionName <String>
   -TopicName <String>
   -NamespaceInputObject <IServiceBusIdentity>
   -Parameter <IRule>
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
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>]
New-AzServiceBusRule
   -Name <String>
   -SubscriptionInputObject <IServiceBusIdentity>
   -Parameter <IRule>
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Create a new rule and updates 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.

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

-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 DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

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

-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 rule name.

Type:String
Aliases:RuleName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NamespaceInputObject

Identity Parameter

Type:IServiceBusIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-NamespaceName

The namespace name

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Parameter

Description of Rule Resource.

Type:IRule
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

Name of the Resource group within the Azure subscription.

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

The 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

Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionInputObject

Identity Parameter

Type:IServiceBusIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-SubscriptionName

The subscription name.

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

-TopicInputObject

Identity Parameter

Type:IServiceBusIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-TopicName

The topic name.

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

Inputs

IRule

IServiceBusIdentity

Outputs

IRule