共用方式為


New-AzActionGroup

在記憶體中建立 ActionGroup 參考物件。

語法

New-AzActionGroup
   -ActionGroupId <String>
   [-WebhookProperty <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

New-AzActionGroup Cmdlet 會在記憶體中建立動作群組參考物件。

範例

範例 1:在記憶體中建立動作群組參考物件

PS C:\>$dict = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]"
PS C:\>$dict.Add('key1', 'value1')
PS C:\>$actionGrp1 = New-AzActionGroup -ActionGroupId 'actiongr1' -WebhookProperty $dict

參數

-ActionGroupId

動作群組的識別碼/名稱。

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

-DefaultProfile

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

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

-WebhookProperty

動作群組的 Webhook 屬性

類型:Dictionary<TKey,TValue>[System.String,System.String]
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

輸入

String

Dictionary<TKey,TValue>[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

輸出

ActivityLogAlertActionGroup