New-AzAlertsSuppressionRuleScope
協助程式 Cmdlet 來建立 PSIScopeElement。
語法
New-AzAlertsSuppressionRuleScope
-Field <String>
[-ContainsSubstring <String>]
[-AnyOf <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
協助程式 Cmdlet 來建立 PSIScopeElement。 可在 Set-AzAlertsSuppressionRule 中作為 -AllOf 參數的一部分使用。
範例
範例 1
$scope1 = New-AzAlertsSuppressionRuleScope -Field "entities.account.name" -ContainsSubstring "Example"
建立 PSScopeElementContains。
範例 2
$scope2 = New-AzAlertsSuppressionRuleScope -Field "entities.file.name" -AnyOf "FileName1","FileName2","FileName3"
建立 PSScopeElementIn。
參數
-AnyOf
只有當欄位等於其中一個值時,才會隱藏。
類型: | String[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ContainsSubstring
只有當欄位包含這個特定值時,才隱藏 。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Field
要設定範圍的實體欄位。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
None