Set-AzScheduledQueryRule
Aktualisiert eine Protokollbenachrichtigungsregel
Syntax
Set-AzScheduledQueryRule
-Source <PSScheduledQueryRuleSource>
[-Schedule <PSScheduledQueryRuleSchedule>]
-Action <PSScheduledQueryRuleAlertingAction>
-Location <String>
[-Description <String>]
-Name <String>
-ResourceGroupName <String>
[-Tag <Hashtable>]
[-Enabled <Boolean>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzScheduledQueryRule
-InputObject <PSScheduledQueryRuleResource>
[-Source <PSScheduledQueryRuleSource>]
[-Schedule <PSScheduledQueryRuleSchedule>]
[-Action <PSScheduledQueryRuleAlertingAction>]
[-Location <String>]
[-Description <String>]
[-Tag <Hashtable>]
[-Enabled <Boolean>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzScheduledQueryRule
-ResourceId <String>
-Source <PSScheduledQueryRuleSource>
[-Schedule <PSScheduledQueryRuleSchedule>]
-Action <PSScheduledQueryRuleAlertingAction>
-Location <String>
[-Description <String>]
[-Tag <Hashtable>]
[-Enabled <Boolean>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Beschreibung
Aktualisiert eine Protokollbenachrichtigungsregel durch PUT-Semantik
Beispiele
Beispiel 1 : Nach Regelname festlegen
PS C:\> Set-AzScheduledQueryRule -ResourceGroupName "MyResourceGroup" -Name "LogAlertRule1" -Enabled $true -Location "centralindia" -Action $alertingAction -Description "log alert description" -Schedule $schedule -Source $source
Description : log alert description
Enabled : true
LastUpdatedTime : 19-Apr-19 12:45:04 PM
ProvisioningState : Succeeded
Source : Microsoft.Azure.Management.Monitor.Models.Source
Schedule : Microsoft.Azure.Management.Monitor.Models.Schedule
Action : Microsoft.Azure.Management.Monitor.Models.AlertingAction
Id : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1
Name : LogAlertRule1
Type : microsoft.insights/scheduledqueryrules
Location : centralindia
Tags : {[hidden-link:/subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]}
Beispiel 2 – Durch Eingabeobjekt festgelegt
PS C:\> Set-AzScheduledQueryRule -InputObject $sqr -Description "changed description"
Description : changed description
Enabled : true
LastUpdatedTime : 19-Apr-19 12:46:38 PM
ProvisioningState : Succeeded
Source : Microsoft.Azure.Management.Monitor.Models.Source
Schedule : Microsoft.Azure.Management.Monitor.Models.Schedule
Action : Microsoft.Azure.Management.Monitor.Models.AlertingAction
Id : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1
Name : LogAlertRule1
Type : microsoft.insights/scheduledqueryrules
Location : centralindia
Tags : {[hidden-link:/subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]}
Beispiel 3 – Nach Ressourcen-ID festlegen
PS C:\> Set-AzScheduledQueryRule -ResourceId "/subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1" -Enabled $true -Location "centralindia" -Action $alertingAction -Description "change description again" -Schedule $schedule -Source $source
Description : change description again
Enabled : true
LastUpdatedTime : 19-Apr-19 12:47:59 PM
ProvisioningState : Succeeded
Source : Microsoft.Azure.Management.Monitor.Models.Source
Schedule : Microsoft.Azure.Management.Monitor.Models.Schedule
Action : Microsoft.Azure.Management.Monitor.Models.AlertingAction
Id : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1
Name : LogAlertRule1
Type : microsoft.insights/scheduledqueryrules
Location : centralindia
Tags : {[hidden-link:/subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]}
Parameter
-Action
Warnungsaktion für geplante Abfrageregel
Typ: | PSScheduledQueryRuleAlertingAction |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-AsJob
Cmdlet im Hintergrund ausführen
Typ: | SwitchParameter |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-Confirm
Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.
Typ: | SwitchParameter |
Aliase: | cf |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-DefaultProfile
Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure
Typ: | IAzureContextContainer |
Aliase: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-Description
Die Beschreibung für diese Warnung
Typ: | String |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-Enabled
Der Azure-Warnungszustand – gültige Werte – $true, $false
Typ: | Boolean |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-InputObject
Die Ressource "Geplante Abfrageregel"
Typ: | PSScheduledQueryRuleResource |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Pipelineeingabe akzeptieren: | True |
Platzhalterzeichen akzeptieren: | False |
-Location
Der Speicherort für diese Warnung
Typ: | String |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-Name
Der Warnungsname
Typ: | String |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-ResourceGroupName
Der Name der Ressourcengruppe
Typ: | String |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-ResourceId
Die Ressourcen-ID
Typ: | String |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Pipelineeingabe akzeptieren: | True |
Platzhalterzeichen akzeptieren: | False |
-Schedule
Der Zeitplan der geplanten Abfrageregel
Typ: | PSScheduledQueryRuleSchedule |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-Source
Die berechnete Abfrageregelquelle
Typ: | PSScheduledQueryRuleSource |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-Tag
Ressourcentags
Typ: | Hashtable |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Typ: | SwitchParameter |
Aliase: | wi |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Pipelineeingabe akzeptieren: | False |
Platzhalterzeichen akzeptieren: | False |
Eingaben
PSScheduledQueryRuleAlertingAction