Set-AzAlertProcessingRule
Membuat atau memperbarui aturan pemrosesan pemberitahuan.
Sintaks
Set-AzAlertProcessingRule
-ResourceGroupName <String>
-Name <String>
[-Description <String>]
[-Enabled <String>]
-Scope <System.Collections.Generic.List`1[System.String]>
[-Tag <Hashtable>]
[-FilterSeverity <String>]
[-FilterMonitorService <String>]
[-FilterMonitorCondition <String>]
[-FilterTargetResource <String>]
[-FilterTargetResourceType <String>]
[-FilterTargetResourceGroup <String>]
[-FilterAlertRuleId <String>]
[-FilterAlertRuleName <String>]
[-FilterDescription <String>]
[-FilterAlertContext <String>]
[-FilterSignalType <String>]
-AlertProcessingRuleType <String>
[-ScheduleStartDateTime <String>]
[-ScheduleEndDateTime <String>]
[-ScheduleTimeZone <String>]
[-ScheduleReccurenceType <String>]
[-ScheduleReccurence2Type <String>]
[-ScheduleReccurenceDaysOfWeek <String>]
[-ScheduleReccurence2DaysOfWeek <String>]
[-ScheduleReccurenceDaysOfMonth <String>]
[-ScheduleReccurence2DaysOfMonth <String>]
[-ScheduleReccurenceStartTime <String>]
[-ScheduleReccurence2StartTime <String>]
[-ScheduleReccurenceEndTime <String>]
[-ScheduleReccurence2EndTime <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzAlertProcessingRule
-InputObject <PSAlertProcessingRule>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzAlertProcessingRule
-ResourceGroupName <String>
-Name <String>
[-Description <String>]
[-Enabled <String>]
-Scope <System.Collections.Generic.List`1[System.String]>
[-Tag <Hashtable>]
[-FilterSeverity <String>]
[-FilterMonitorService <String>]
[-FilterMonitorCondition <String>]
[-FilterTargetResource <String>]
[-FilterTargetResourceType <String>]
[-FilterTargetResourceGroup <String>]
[-FilterAlertRuleId <String>]
[-FilterAlertRuleName <String>]
[-FilterDescription <String>]
[-FilterAlertContext <String>]
[-FilterSignalType <String>]
-AlertProcessingRuleType <String>
[-ScheduleStartDateTime <String>]
[-ScheduleEndDateTime <String>]
[-ScheduleTimeZone <String>]
[-ScheduleReccurenceType <String>]
[-ScheduleReccurence2Type <String>]
[-ScheduleReccurenceDaysOfWeek <String>]
[-ScheduleReccurence2DaysOfWeek <String>]
[-ScheduleReccurenceDaysOfMonth <String>]
[-ScheduleReccurence2DaysOfMonth <String>]
[-ScheduleReccurenceStartTime <String>]
[-ScheduleReccurence2StartTime <String>]
[-ScheduleReccurenceEndTime <String>]
[-ScheduleReccurence2EndTime <String>]
-ActionGroupId <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Deskripsi
Set-AzAlertProcessingRule membuat atau memperbarui aturan pemrosesan pemberitahuan.
Contoh
Contoh 1
Set-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AddActionGroupToSubscription" -Scope "/subscriptions/MySubscriptionId" -Description "Add ActionGroup1 to all alerts in the subscription" -Enabled "True" -AlertProcessingRuleType "AddActionGroups" -ActionGroupId "/subscriptions/MySubscriptionId/resourcegroups/MyResourceGroup1/providers/microsoft.insights/actiongroups/ActionGroup1"
Cmdlet ini membuat aturan pemrosesan pemberitahuan yang menambahkan grup tindakan ke semua pemberitahuan dalam grup sumber daya.
Contoh 2
Set-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "AddActionGroupsBySeverity" -Scope "/subscriptions/MySubscriptionId" -Description "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups" -Enabled "True" -AlertProcessingRuleType "AddActionGroups" -ActionGroupId "/subscriptions/MySubscriptionId/resourcegroups/MyResourceGroup1/providers/microsoft.insights/actiongroups/ActionGroup1,/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup2/providers/microsoft.insights/actionGroups/MyActionGroup2" -FilterMonitorCondition "Equals:Sev0,Sev1"
Cmdlet ini membuat aturan yang menambahkan dua grup tindakan ke semua pemberitahuan Sev0 dan Sev1
Parameter
-ActionGroupId
Id Grup Tindakan yang akan diberi tahu, Daftar nilai yang dipisahkan koma Diperlukan hanya jika jenis aturan pemrosesan pemberitahuan adalah AddActionGroups.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-AlertProcessingRuleType
Jenis aturan Pemrosesan Pemberitahuan. Nilai yang diizinkan: AddActionGroups, RemoveAllActionGroups.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Confirm
Meminta Anda mengonfirmasi sebelum menjalankan cmdlet.
Jenis: | SwitchParameter |
Alias: | cf |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DefaultProfile
Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan Azure.
Jenis: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Description
Deskripsi Aturan Pemrosesan Pemberitahuan
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Enabled
Tunjukkan apakah aturan pemrosesan pemberitahuan yang diberikan diaktifkan atau dinonaktifkan (default diaktifkan). Nilai yang diizinkan: False, True.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterAlertContext
Format yang diharapkan - {<operation>:<comma separated list of values>} operation: one of <Equals, NotEquals, Contains, DoesNotContain> For eg. Berisi:smartgroups
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterAlertRuleId
Format yang diharapkan - {<operation>:<comma separated list of values>} operation: one of <Equals, NotEquals, Contains, DoesNotContain> For eg. Sama dengan:/subscriptions/MySubscriptionId/resourceGroups/abvarma/providers/microsoft.insights/metricAlerts/test-mrmc-vm-abvarma
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterAlertRuleName
Format yang diharapkan - {<operation>:<comma separated list of values>} operation: one of <Equals, NotEquals, Contains, DoesNotContain> For eg. Equals:ARM Name Test1,ARM Name Test2
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterDescription
Format yang diharapkan - {<operation>:<comma separated list of values>} operation: one of <Equals, NotEquals, Contains, DoesNotContain> For eg. Berisi:Pemberitahuan Pengujian
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterMonitorCondition
Format yang diharapkan - {<operation>:<comma separated list of values>} operation: one of <Equals, NotEquals, Contains, DoesNotContain> For eg. NotEquals:Resolved
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterMonitorService
Format yang diharapkan - {<operation>:<comma separated list of values>} operation: one of <Equals, NotEquals, Contains, DoesNotContain> For eg. Sama dengan:Platform,Analitik Log
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterSeverity
Format yang diharapkan - {<operation>:<comma separated list of values>} severity: one of <Sev0, Sev1, Sev2, Sev3, Sev4>. Misalnya Sama dengan:Sev0,Sev1
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterSignalType
Format yang diharapkan - {<operation>:<comma separated list of values>} operation: one of <Equals, NotEquals, Contains, DoesNotContain> For eg. Sama dengan:Metrik
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterTargetResource
Format yang diharapkan - {<operation>:<comma separated list of values>} operation: one of <Equals, NotEquals, Contains, DoesNotContain> For eg. Sama dengan:mySQLDataBaseName
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterTargetResourceGroup
Format yang diharapkan - {<operation>:<comma separated list of values>} operation: one of <Equals, NotEquals, Contains, DoesNotContain> For eg. NotEquals:/subscriptions/<subscriptionID>/resourceGroups/test
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilterTargetResourceType
Format yang diharapkan - {<operation>:<comma separated list of values>} operation: one of <Equals, NotEquals, Contains, DoesNotContain> For eg. Contains:Virtual Machines,Storage Account
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-InputObject
Sumber daya aturan pemrosesan pemberitahuan
Jenis: | PSAlertProcessingRule |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-Name
Nama Aturan Pemrosesan Pemberitahuan
Jenis: | String |
Alias: | ResourceId |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ResourceGroupName
Nama Grup Sumber Daya
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleEndDateTime
Waktu Tanggal Selesai. Format 2022-09-21 06:00:00 Harus disebutkan dalam kasus Jadwal Berulang - Harian, Mingguan atau Bulanan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleReccurence2DaysOfMonth
Daftar nilai pola pengulangan Format yang diharapkan Untuk jenis pengulangan bulanan. daftar nilai yang dipisahkan koma Untuk misalnya. 1,3,12
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleReccurence2DaysOfWeek
Daftar nilai pola pengulangan Format yang diharapkan Untuk jenis pengulangan mingguan. daftar nilai yang dipisahkan koma Untuk misalnya. Senin,Sabtu
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleReccurence2EndTime
Waktu Mulai Keakuratan dalam zona waktu parameter ScheduleTimeZone. Format 06:00:00 Harus disebutkan dalam kasus Jadwal Berulang - Harian, Mingguan, atau Bulanan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleReccurence2StartTime
Waktu Mulai Keakuratan dalam zona waktu parameter ScheduleTimeZone. Format 06:00:00 Harus disebutkan dalam kasus Jadwal Berulang - Harian, Mingguan, atau Bulanan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleReccurence2Type
Menentukan kapan aturan pemrosesan harus diterapkan. Nilai yang diizinkan: Harian, Bulanan, Mingguan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleReccurenceDaysOfMonth
Daftar nilai pola pengulangan Format yang diharapkan Untuk jenis pengulangan bulanan. daftar nilai yang dipisahkan koma Untuk misalnya. 1,3,12
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleReccurenceDaysOfWeek
Daftar nilai pola pengulangan Format yang diharapkan Untuk jenis pengulangan mingguan. daftar nilai yang dipisahkan koma Untuk misalnya. Senin,Sabtu
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleReccurenceEndTime
Waktu Mulai Keakuratan dalam zona waktu parameter ScheduleTimeZone. Format 06:00:00 Harus disebutkan dalam kasus Jadwal Berulang - Harian, Mingguan, atau Bulanan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleReccurenceStartTime
Waktu Mulai Keakuratan dalam zona waktu parameter ScheduleTimeZone. Format 06:00:00 Harus disebutkan dalam kasus Jadwal Berulang - Harian, Mingguan, atau Bulanan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleReccurenceType
Menentukan kapan aturan pemrosesan harus diterapkan. Nilai yang diizinkan: Harian, Bulanan, Mingguan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleStartDateTime
Waktu Tanggal Mulai. Format 2022-09-21 06:00:00 Harus disebutkan dalam kasus Jadwal Berulang - Harian, Mingguan atau Bulanan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ScheduleTimeZone
Jadwalkan zona waktu. Default: UTC.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Scope
Daftar ID sumber daya, daftar nilai yang dipisahkan koma Aturan akan berlaku untuk pemberitahuan yang diaktifkan pada sumber daya dalam cakupan tersebut
Jenis: | List<T>[String] |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Tag
Tag aturan Pemrosesan Pemberitahuan. Misalnya @{"tag1" = "key1";" tag2" = "key2"} Gunakan {} untuk menghapus tag yang ada.
Jenis: | Hashtable |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-WhatIf
Menunjukkan apa yang akan terjadi jika cmdlet berjalan. Cmdlet tidak dijalankan.
Jenis: | SwitchParameter |
Alias: | wi |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
Input
Microsoft.Azure.Commands.AlertsManagement.OutputModels.PSActionRule
Output
Microsoft.Azure.Commands.AlertsManagement.OutputModels.PSActionRule
Azure PowerShell