共用方式為


Update-AzAlertProcessingRule

更新警示處理規則屬性。

語法

Update-AzAlertProcessingRule
      -Name <String>
      -ResourceGroupName <String>
      [-Enabled <String>]
      [-Tag <Hashtable>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzAlertProcessingRule
      -ResourceId <String>
      [-Enabled <String>]
      [-Tag <Hashtable>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzAlertProcessingRule
      -InputObject <PSAlertProcessingRule>
      [-Enabled <String>]
      [-Tag <Hashtable>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Update-AzAlertProcessingRule Cmdlet 會更新警示處理規則屬性 - 啟用的狀態和標籤。

範例

範例 1

Update-AzAlertProcessingRule -ResourceGroupName "test-rg" -Name "Test-AlertProcessingRule" -Enabled "False"

此 Cmdlet 會停用警示處理規則。

參數

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Enabled

警示處理規則狀態

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

動作規則資源

類型:PSAlertProcessingRule
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

警示處理規則名稱

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

警示處理規則名稱

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceId

動作規則的資源識別碼

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Tag

警示處理規則標籤 例如 @{“tag1” = “key1”;”tag2“ = ”key2“} 使用 {} 清除現有的標籤。

類型:Hashtable
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

String

PSAlertProcessingRule

輸出

PSAlertProcessingRule