次の方法で共有


New-AzAlertsSuppressionRuleScope

PSIScopeElement を作成するヘルパー コマンドレット。

構文

New-AzAlertsSuppressionRuleScope
   -Field <String>
   [-ContainsSubstring <String>]
   [-AnyOf <String[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

説明

PSIScopeElement を作成するヘルパー コマンドレット。 -AllOf パラメーターの一部として Set-AzAlertsSuppressionRule で使用できます。

例 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

フィールドがこれらの値の 1 つと等しい場合にのみ非表示にします。

型:String[]
Position:Named
既定値:None
必須:False
Accept pipeline input:False
Accept wildcard characters:False

-ContainsSubstring

フィールドにこの特定の値が含まれている場合にのみ抑制します。

型:String
Position:Named
既定値:None
必須:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。

型:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
既定値:None
必須:False
Accept pipeline input:False
Accept wildcard characters:False

-Field

スコープの対象のエンティティ フィールド。

型:String
Position:Named
既定値:None
必須:True
Accept pipeline input:False
Accept wildcard characters:False

入力

None

出力

PSIScopeElement