New-AzActionGroup
Buat grup tindakan baru atau Buat yang sudah ada.
Sintaks
New-AzActionGroup
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-Location <String>
[-ArmRoleReceiver <IArmRoleReceiver[]>]
[-AutomationRunbookReceiver <IAutomationRunbookReceiver[]>]
[-AzureAppPushReceiver <IAzureAppPushReceiver[]>]
[-AzureFunctionReceiver <IAzureFunctionReceiver[]>]
[-EmailReceiver <IEmailReceiver[]>]
[-Enabled]
[-EventHubReceiver <IEventHubReceiver[]>]
[-GroupShortName <String>]
[-ItsmReceiver <IItsmReceiver[]>]
[-LogicAppReceiver <ILogicAppReceiver[]>]
[-SmsReceiver <ISmsReceiver[]>]
[-Tag <Hashtable>]
[-VoiceReceiver <IVoiceReceiver[]>]
[-WebhookReceiver <IWebhookReceiver[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzActionGroup
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-JsonString <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzActionGroup
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-JsonFilePath <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzActionGroup
-InputObject <IActionGroupIdentity>
-Location <String>
[-ArmRoleReceiver <IArmRoleReceiver[]>]
[-AutomationRunbookReceiver <IAutomationRunbookReceiver[]>]
[-AzureAppPushReceiver <IAzureAppPushReceiver[]>]
[-AzureFunctionReceiver <IAzureFunctionReceiver[]>]
[-EmailReceiver <IEmailReceiver[]>]
[-Enabled]
[-EventHubReceiver <IEventHubReceiver[]>]
[-GroupShortName <String>]
[-ItsmReceiver <IItsmReceiver[]>]
[-LogicAppReceiver <ILogicAppReceiver[]>]
[-SmsReceiver <ISmsReceiver[]>]
[-Tag <Hashtable>]
[-VoiceReceiver <IVoiceReceiver[]>]
[-WebhookReceiver <IWebhookReceiver[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Deskripsi
Buat grup tindakan baru atau Buat yang sudah ada.
Contoh
Contoh 1: Membuat grup tindakan
$email1 = New-AzActionGroupEmailReceiverObject -EmailAddress user@example.com -Name user1
$sms1 = New-AzActionGroupSmsReceiverObject -CountryCode '{countrycode}' -Name user2 -PhoneNumber '{phonenumber}'
New-AzActionGroup -Name 'actiongroup1' -ResourceGroupName 'Monitor-Action' -Location northcentralus -GroupShortName ag1 -EmailReceiver $email1 -SmsReceiver $sms1
ArmRoleReceiver : {}
AutomationRunbookReceiver : {}
AzureAppPushReceiver : {}
AzureFunctionReceiver : {}
EmailReceiver : {{
"name": "user1",
"emailAddress": "user@example.com",
"useCommonAlertSchema": false,
"status": "Enabled"
}}
Enabled : False
EventHubReceiver : {}
GroupShortName : ag1
Id : /subscriptions/{subid}/resourceGroups/Monitor-Action/providers/microsoft.insights/actionGroups/actiongroup1
ItsmReceiver : {}
Location : northcentralus
LogicAppReceiver : {}
Name : actiongroup1
ResourceGroupName : Monitor-Action
SmsReceiver : {{
"name": "user2",
"countryCode": "{countrycode}",
"phoneNumber": "{phonenumber}",
"status": "Enabled"
}}
Tag : {
}
Type : Microsoft.Insights/ActionGroups
VoiceReceiver : {}
WebhookReceiver : {}
Dua perintah pertama membuat dua penerima. Perintah akhir membuat grup tindakan termasuk dua penerima.
Contoh 2: membuat grup tindakan lain
New-AzActionGroup -Name 'actiongroup1' -ResourceGroupName 'Monitor-Action' -Location northcentralus -GroupShortName ag1
ArmRoleReceiver : {}
AutomationRunbookReceiver : {}
AzureAppPushReceiver : {}
AzureFunctionReceiver : {}
EmailReceiver : {}
Enabled : False
EventHubReceiver : {}
GroupShortName : ag1
Id : /subscriptions/{subid}/resourceGroups/Monitor-Action/providers/microsoft.insights/actionGroups/actiongroup1
ItsmReceiver : {}
Location : northcentralus
LogicAppReceiver : {}
Name : actiongroup1
ResourceGroupName : Monitor-Action
SmsReceiver : {}
Tag : {
}
Type : Microsoft.Insights/ActionGroups
VoiceReceiver : {}
WebhookReceiver : {}
Perintah ini membuat grup tindakan tanpa penerima.
Parameter
-ArmRoleReceiver
Daftar penerima peran ARM yang merupakan bagian dari grup tindakan ini. Peran adalah peran Azure RBAC dan hanya peran bawaan yang didukung.
Jenis: | IArmRoleReceiver[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-AutomationRunbookReceiver
Daftar penerima AutomationRunbook yang merupakan bagian dari grup tindakan ini.
Jenis: | IAutomationRunbookReceiver[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-AzureAppPushReceiver
Daftar penerima AzureAppPush yang merupakan bagian dari grup tindakan ini.
Jenis: | IAzureAppPushReceiver[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-AzureFunctionReceiver
Daftar penerima fungsi azure yang merupakan bagian dari grup tindakan ini.
Jenis: | IAzureFunctionReceiver[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
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
Parameter DefaultProfile tidak berfungsi. Gunakan parameter SubscriptionId saat tersedia jika menjalankan cmdlet terhadap langganan yang berbeda.
Jenis: | PSObject |
Alias: | AzureRMContext, AzureCredential |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EmailReceiver
Daftar penerima email yang merupakan bagian dari grup tindakan ini.
Jenis: | IEmailReceiver[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Enabled
Menunjukkan apakah grup tindakan ini diaktifkan. Jika grup tindakan tidak diaktifkan, maka tidak ada penerimanya yang akan menerima komunikasi.
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EventHubReceiver
Daftar penerima pusat aktivitas yang merupakan bagian dari grup tindakan ini.
Jenis: | IEventHubReceiver[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-GroupShortName
Nama pendek grup tindakan. Ini akan digunakan dalam pesan SMS.
Jenis: | String |
Alias: | ShortName |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-InputObject
Parameter Identitas
Jenis: | IActionGroupIdentity |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-ItsmReceiver
Daftar penerima ITSM yang merupakan bagian dari grup tindakan ini.
Jenis: | IItsmReceiver[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-JsonFilePath
Jalur file Json yang disediakan ke operasi Buat
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-JsonString
String Json yang disediakan ke operasi Buat
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Location
Lokasi sumber daya
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-LogicAppReceiver
Daftar penerima aplikasi logika yang merupakan bagian dari grup tindakan ini.
Jenis: | ILogicAppReceiver[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Name
Nama grup tindakan.
Jenis: | String |
Alias: | ActionGroupName |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ResourceGroupName
Nama grup sumber daya. Nama tidak peka huruf besar/kecil.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SmsReceiver
Daftar penerima SMS yang merupakan bagian dari grup tindakan ini.
Jenis: | ISmsReceiver[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SubscriptionId
ID langganan target.
Jenis: | String |
Position: | Named |
Nilai default: | (Get-AzContext).Subscription.Id |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Tag
Tag sumber daya
Jenis: | Hashtable |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-VoiceReceiver
Daftar penerima suara yang merupakan bagian dari grup tindakan ini.
Jenis: | IVoiceReceiver[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-WebhookReceiver
Daftar penerima webhook yang merupakan bagian dari grup tindakan ini.
Jenis: | IWebhookReceiver[] |
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 |