Set-AzScheduledQueryRule
Een waarschuwingsregel voor logboeken bijwerken
Syntaxis
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>]
Description
Hiermee werkt u een waarschuwingsregel voor logboeken bij op PUT-semantiek
Voorbeelden
Voorbeeld 1: Instellen op regelnaam
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]}
Voorbeeld 2: Instellen op invoerobject
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]}
Voorbeeld 3: Instellen op resource-id
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]}
Parameters
-Action
De actie Waarschuwing voor de geplande queryregel
Type: | PSScheduledQueryRuleAlertingAction |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-AsJob
Cmdlet op de achtergrond uitvoeren
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Confirm
Hiermee wordt u gevraagd om bevestiging voordat u de cmdlet uitvoert.
Type: | SwitchParameter |
Aliassen: | cf |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DefaultProfile
De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.
Type: | IAzureContextContainer |
Aliassen: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Description
De beschrijving voor deze waarschuwing
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Enabled
De azure-waarschuwingsstatus - geldige waarden - $true, $false
Type: | Boolean |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-InputObject
De resource voor de geplande queryregel
Type: | PSScheduledQueryRuleResource |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-Location
De locatie voor deze waarschuwing
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Name
De naam van de waarschuwing
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-ResourceGroupName
De naam van de resourcegroep
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-ResourceId
De resource-id
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-Schedule
Het geplande queryregelschema
Type: | PSScheduledQueryRuleSchedule |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Source
De bron van de geplande queryregel
Type: | PSScheduledQueryRuleSource |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Tag
Resourcetags
Type: | Hashtable |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-WhatIf
Hiermee wordt weergegeven wat er zou gebeuren als u de cmdlet uitvoert. De cmdlet wordt niet uitgevoerd.
Type: | SwitchParameter |
Aliassen: | wi |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Invoerwaarden
PSScheduledQueryRuleAlertingAction