New-AzServiceBusRule
建立新的規則並更新現有的規則
語法
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
建立新的規則並更新現有的規則
範例
範例 1:建立相互關聯篩選
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 :
在 ServiceBus 訂用帳戶 mySubscription
中建立相互關聯篩選 myCorrelationRule
。
範例 2:建立 Sql 篩選
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 :
在 ServiceBus 訂用帳戶中建立 sql 篩選 mySqlRule
mySubscription
。
參數
-ActionRequiresPreprocessing
值,指出規則動作是否需要前置處理。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ActionSqlExpression
SQL 運算式。 例如 MyProperty='ABC'
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ContentType
訊息的內容類型。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-CorrelationFilterProperty
自定義篩選的字典物件
類型: | Hashtable |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-CorrelationFilterRequiresPreprocessing
值,指出規則動作是否需要前置處理。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-CorrelationId
相互關聯標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。
類型: | PSObject |
別名: | AzureRMContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-FilterType
針對 BrokeredMessage 評估的篩選類型。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Label
應用程式特定標籤。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-MessageId
訊息的標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
規則名稱。
類型: | String |
別名: | RuleName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-NamespaceInputObject
Identity 參數
類型: | IServiceBusIdentity |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-NamespaceName
命名空間名稱
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Parameter
規則資源的描述。
類型: | IRule |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ReplyTo
要回復之佇列的位址。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ReplyToSessionId
要回復的會話標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
Azure 訂用帳戶內的資源組名。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-SessionId
會話標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-SqlExpression
SQL 運算式。 例如 MyProperty='ABC'
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-SqlFilterRequiresPreprocessing
值,指出規則動作是否需要前置處理。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionId
可唯一識別Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶標識碼會形成每個服務呼叫 URI 的一部分。
類型: | String |
Position: | Named |
預設值: | (Get-AzContext).Subscription.Id |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionInputObject
Identity 參數
類型: | IServiceBusIdentity |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-SubscriptionName
訂用帳戶名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-To
要傳送至的位址。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-TopicInputObject
Identity 參數
類型: | IServiceBusIdentity |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-TopicName
主題名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |