Dela via


Set-AzServiceBusRule

Uppdaterar en ServiceBus-regel

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

Uppdaterar en ServiceBus-regel

Exempel

Exempel 1: Uppdatera ett korrelationsfilter

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            :

Uppdatera ContentType- och ReplyToSessionId parametrarna för ett korrelationsfilter myCorrelationRule i ServiceBus-prenumerationen mySubscription.

Exempel 2: Uppdatera ett Sql-filter med parameteruppsättningen InputObject

$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         :

Uppdatera SqlExpression av SqlFilter mySqlRule med parameteruppsättningen InputObject.

Parametrar

-ActionRequiresPreprocessing

Värde som anger om regelåtgärden kräver förbearbetning.

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ActionSqlExpression

SQL-uttryck. t.ex. MyProperty='ABC'

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-AsJob

Kör kommandot som ett jobb

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

Typ:SwitchParameter
Alias:cf
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ContentType

Meddelandets innehållstyp.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-CorrelationFilterProperty

ordlisteobjekt för anpassade filter

Typ:Hashtable
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-CorrelationFilterRequiresPreprocessing

Värde som anger om regelåtgärden kräver förbearbetning.

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-CorrelationId

Identifierare för korrelationen.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-DefaultProfile

Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.

Typ:PSObject
Alias:AzureRMContext, AzureCredential
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-FilterType

Filtertyp som utvärderas mot en BrokeredMessage.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-InputObject

Identitetsparameter. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för INPUTOBJECT-egenskaper och skapa en hash-tabell.

Typ:IServiceBusIdentity
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:True
Godkänn jokertecken:False

-Label

Programspecifik etikett.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-MessageId

Identifierare för meddelandet.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-Name

Namnet på regeln.

Typ:String
Alias:RuleName
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-NamespaceName

Namnet på ServiceBus-namnområdet

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-NoWait

Kör kommandot asynkront

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ReplyTo

Adressen till kön som du vill svara på.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ReplyToSessionId

Sessionsidentifierare att svara på.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-ResourceGroupName

Namnet på resursgruppen. Namnet är skiftlägesokänsligt.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-SessionId

Sessionsidentifierare.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-SqlExpression

SQL-uttryck. t.ex. MyProperty='ABC'

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-SqlFilterRequiresPreprocessing

Värde som anger om regelåtgärden kräver förbearbetning.

Typ:SwitchParameter
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-SubscriptionId

ID för målprenumerationen.

Typ:String
Position:Named
Standardvärde:(Get-AzContext).Subscription.Id
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-SubscriptionName

Namnet på SubscriptionName.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-To

Adress att skicka till.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-TopicName

Namnet på ämnet.

Typ:String
Position:Named
Standardvärde:None
Obligatorisk:True
Godkänn pipeline-indata:False
Godkänn jokertecken:False

-WhatIf

Visar vad som skulle hända om cmdleten körs. Cmdleten körs inte.

Typ:SwitchParameter
Alias:wi
Position:Named
Standardvärde:None
Obligatorisk:False
Godkänn pipeline-indata:False
Godkänn jokertecken:False

Indata

IServiceBusIdentity

Utdata

IRule