Action Groups - Post Test Notifications
指定された一連の受信者にテスト通知を送信する
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications?api-version=2021-09-01
URI パラメーター
| 名前 | / | 必須 | 型 | 説明 |
|---|---|---|---|---|
|
subscription
|
path | True |
string minLength: 1 |
ターゲット サブスクリプションの ID。 |
|
api-version
|
query | True |
string minLength: 1 |
この操作に使用する API バージョン。 |
要求本文
| 名前 | 必須 | 型 | 説明 |
|---|---|---|---|
| alertType | True |
string maxLength: 30 |
サポートされているアラートの種類の値。 サポートされているアラートの種類の値は、servicehealth、metricstaticthreshold、metricsdynamicthreshold、logalertv2、smartalert、webtestalert、logalertv1numresult、logalertv1metricmeasurement、resourcehealth、activitylog、actualcostbudget、forecastedbudget です。 |
| armRoleReceivers |
このアクション グループの一部である ARM ロール レシーバーの一覧。 ロールは Azure RBAC ロールであり、組み込みロールのみがサポートされています。 |
||
| automationRunbookReceivers |
このアクション グループの一部である AutomationRunbook レシーバーの一覧。 |
||
| azureAppPushReceivers |
このアクション グループの一部である AzureAppPush レシーバーの一覧。 |
||
| azureFunctionReceivers |
このアクション グループの一部である Azure 関数レシーバーの一覧。 |
||
| emailReceivers |
このアクション グループの一部である電子メール 受信者の一覧。 |
||
| eventHubReceivers |
このアクション グループの一部であるイベント ハブ レシーバーの一覧。 |
||
| itsmReceivers |
このアクション グループの一部である ITSM レシーバーの一覧。 |
||
| logicAppReceivers |
このアクション グループの一部であるロジック アプリレシーバーの一覧。 |
||
| smsReceivers |
このアクション グループの一部である SMS レシーバーの一覧。 |
||
| voiceReceivers |
このアクション グループの一部である音声レシーバーの一覧。 |
||
| webhookReceivers |
このアクション グループの一部である Webhook レシーバーの一覧。 |
応答
| 名前 | 型 | 説明 |
|---|---|---|
| 200 OK |
通知が成功しました |
|
| 202 Accepted |
受け入れられた通知要求 ヘッダー location: string |
|
| Other Status Codes |
テスト通知の送信中にエラーが発生しました |
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
| 名前 | 説明 |
|---|---|
| user_impersonation | ユーザー アカウントを偽装する |
例
Create notifications at subscription level
要求のサンプル
POST https://management.azure.com/subscriptions/187f412d-1758-44d9-b052-169e2564721d/providers/Microsoft.Insights/createNotifications?api-version=2021-09-01
{
"alertType": "budget",
"emailReceivers": [
{
"name": "John Doe's email",
"emailAddress": "johndoe@email.com",
"useCommonAlertSchema": false
},
{
"name": "Jane Smith's email",
"emailAddress": "janesmith@email.com",
"useCommonAlertSchema": true
}
],
"smsReceivers": [
{
"name": "John Doe's mobile",
"countryCode": "1",
"phoneNumber": "1234567890"
},
{
"name": "Jane Smith's mobile",
"countryCode": "1",
"phoneNumber": "0987654321"
}
],
"webhookReceivers": [
{
"name": "Sample webhook 1",
"serviceUri": "http://www.example.com/webhook1",
"useCommonAlertSchema": true
},
{
"name": "Sample webhook 2",
"serviceUri": "http://www.example.com/webhook2",
"useCommonAlertSchema": true,
"useAadAuth": true,
"objectId": "d3bb868c-fe44-452c-aa26-769a6538c808",
"identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84"
}
],
"itsmReceivers": [
{
"name": "Sample itsm",
"workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c",
"connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1",
"ticketConfiguration": "{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}",
"region": "westcentralus"
}
],
"azureAppPushReceivers": [
{
"name": "Sample azureAppPush",
"emailAddress": "johndoe@email.com"
}
],
"automationRunbookReceivers": [
{
"automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest",
"runbookName": "Sample runbook",
"webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084",
"isGlobalRunbook": false,
"name": "testRunbook",
"serviceUri": "http://test.me",
"useCommonAlertSchema": true
}
],
"voiceReceivers": [
{
"name": "Sample voice",
"countryCode": "1",
"phoneNumber": "1234567890"
}
],
"logicAppReceivers": [
{
"name": "Sample logicApp",
"resourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp",
"callbackUrl": "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w",
"useCommonAlertSchema": false
}
],
"azureFunctionReceivers": [
{
"name": "Sample azureFunction",
"functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp",
"functionName": "HttpTriggerCSharp1",
"httpTriggerUrl": "http://test.me",
"useCommonAlertSchema": true
}
],
"eventHubReceivers": [
{
"name": "Sample eventHub",
"eventHubNameSpace": "testEventHubNameSpace",
"eventHubName": "testEventHub",
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84"
}
],
"armRoleReceivers": [
{
"name": "ArmRole-Common",
"roleId": "11111111-1111-1111-1111-111111111111",
"useCommonAlertSchema": true
},
{
"name": "ArmRole-nonCommon",
"roleId": "11111111-1111-1111-1111-111111111111",
"useCommonAlertSchema": false
}
]
}
応答のサンプル
location: https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/providers/microsoft.insights/notificationStatus/11111111111111?api-version=2022-06-01
{
"context": {
"notificationSource": "Microsoft.Insights/TestNotification",
"contextType": "Microsoft.Insights/Budget"
},
"state": "Completed",
"completedTime": "0001-01-01T00:00:00+00:00",
"createdTime": "2021-09-21T04:52:29.5091168+00:00",
"actionDetails": [
{
"MechanismType": "AzureAppPush",
"Name": "AzureAppPush-name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:42.8620629+00:00",
"Detail": null
},
{
"MechanismType": "AzureFunction",
"Name": "AzureFunction-name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:42.0623319+00:00",
"Detail": null
},
{
"MechanismType": "Email",
"Name": "Email-name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:40.7480368+00:00",
"Detail": null
},
{
"MechanismType": "LogicApp",
"Name": "LogicApp-Name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:42.2473419+00:00",
"Detail": null
},
{
"MechanismType": "Webhook",
"Name": "Webhook-name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:42.0723479+00:00",
"Detail": null
},
{
"MechanismType": "SecureWebhook",
"Name": "SecureWebhook-name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:42.0723479+00:00",
"Detail": null
},
{
"MechanismType": "Sms",
"Name": "Sms-name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:41.353015+00:00",
"Detail": null
},
{
"MechanismType": "Voice",
"Name": "Voice-name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:41.6330734+00:00",
"Detail": null
},
{
"MechanismType": "EventHub",
"Name": "EventHub-name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:42.0723479+00:00",
"Detail": null
},
{
"MechanismType": "AutomationRunbook",
"Name": "AutomationRunbook-name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:42.0723479+00:00",
"Detail": null
},
{
"MechanismType": "Itsm",
"Name": "Itsm-name",
"Status": "Completed",
"SubState": "Default",
"SendTime": "2021-09-21T04:52:42.0723479+00:00",
"Detail": null
}
]
}
定義
| 名前 | 説明 |
|---|---|
|
Action |
アクションの詳細 |
|
Arm |
Arm ロールレシーバー。 |
|
Automation |
Azure Automation Runbook 通知レシーバー。 |
|
Azure |
Azure モバイル アプリのプッシュ通知レシーバー。 |
|
Azure |
Azure 関数レシーバー。 |
| Context |
コンテキスト情報 |
|
Email |
電子メールの受信者。 |
|
Error |
エラー応答の形式について説明します。 |
|
Event |
イベント ハブ レシーバー。 |
|
Itsm |
Itsm レシーバー。 |
|
Logic |
ロジック アプリレシーバー。 |
|
Notification |
連絡先の詳細メタデータを含む要求本文 |
|
Receiver |
受信側の状態を示します。 有効になっていない受信者は、通信を受信しません。 |
|
Sms |
SMS レシーバー。 |
|
Test |
テスト通知の結果の詳細。 |
|
Voice |
音声レシーバー。 |
|
Webhook |
Webhook レシーバー。 |
ActionDetail
アクションの詳細
| 名前 | 型 | 説明 |
|---|---|---|
| Detail |
string |
わかりやすいエラー メッセージの詳細 |
| MechanismType |
string |
メカニズムの種類 |
| Name |
string |
アクションの名前 |
| SendTime |
string |
送信時刻 |
| Status |
string |
アクションの状態 |
| SubState |
string |
アクションの副状態 |
ArmRoleReceiver
Arm ロールレシーバー。
| 名前 | 型 | 規定値 | 説明 |
|---|---|---|---|
| name |
string |
arm ロール レシーバーの名前。 名前は、アクション グループ内のすべての受信者で一意である必要があります。 |
|
| roleId |
string |
arm ロール ID。 |
|
| useCommonAlertSchema |
boolean |
False |
共通のアラート スキーマを使用するかどうかを示します。 |
AutomationRunbookReceiver
Azure Automation Runbook 通知レシーバー。
| 名前 | 型 | 規定値 | 説明 |
|---|---|---|---|
| automationAccountId |
string |
この Runbook を保持し、Azure リソースに対して認証する Azure Automation アカウント ID。 |
|
| isGlobalRunbook |
boolean |
このインスタンスがグローバル Runbook であるかどうかを示します。 |
|
| name |
string |
Webhook の名前を示します。 |
|
| runbookName |
string |
この Runbook の名前。 |
|
| serviceUri |
string |
Webhook を送信する URI。 |
|
| useCommonAlertSchema |
boolean |
False |
共通のアラート スキーマを使用するかどうかを示します。 |
| webhookResourceId |
string |
この Runbook にリンクされている Webhook のリソース ID。 |
AzureAppPushReceiver
Azure モバイル アプリのプッシュ通知レシーバー。
| 名前 | 型 | 説明 |
|---|---|---|
| emailAddress |
string |
Azure モバイル アプリに登録されている電子メール アドレス。 |
| name |
string |
Azure モバイル アプリプッシュレシーバーの名前。 名前は、アクション グループ内のすべての受信者で一意である必要があります。 |
AzureFunctionReceiver
Azure 関数レシーバー。
| 名前 | 型 | 規定値 | 説明 |
|---|---|---|---|
| functionAppResourceId |
string |
関数アプリの Azure リソース ID。 |
|
| functionName |
string |
関数アプリの関数名。 |
|
| httpTriggerUrl |
string |
http 要求の送信先の http トリガー URL。 |
|
| name |
string |
Azure 関数レシーバーの名前。 名前は、アクション グループ内のすべての受信者で一意である必要があります。 |
|
| useCommonAlertSchema |
boolean |
False |
共通のアラート スキーマを使用するかどうかを示します。 |
Context
コンテキスト情報
| 名前 | 型 | 説明 |
|---|---|---|
| contextType |
string |
コンテキスト ID の種類 |
| notificationSource |
string |
通知要求のソース |
EmailReceiver
電子メールの受信者。
| 名前 | 型 | 規定値 | 説明 |
|---|---|---|---|
| emailAddress |
string |
この受信者の電子メール アドレス。 |
|
| name |
string |
電子メール受信者の名前。 名前は、アクション グループ内のすべての受信者で一意である必要があります。 |
|
| status |
電子メールの受信者の状態。 |
||
| useCommonAlertSchema |
boolean |
False |
共通のアラート スキーマを使用するかどうかを示します。 |
ErrorResponse
エラー応答の形式について説明します。
| 名前 | 型 | 説明 |
|---|---|---|
| code |
string |
エラー コード |
| message |
string |
操作が失敗した理由を示すエラー メッセージ。 |
EventHubReceiver
イベント ハブ レシーバー。
| 名前 | 型 | 規定値 | 説明 |
|---|---|---|---|
| eventHubName |
string |
特定のイベント ハブ キューの名前 |
|
| eventHubNameSpace |
string |
Event Hub 名前空間 |
|
| name |
string |
イベント ハブ レシーバーの名前。 名前は、アクション グループ内のすべての受信者で一意である必要があります。 |
|
| subscriptionId |
string |
このイベント ハブを含むサブスクリプションの ID |
|
| tenantId |
string |
このイベント ハブを含むサブスクリプションのテナント ID |
|
| useCommonAlertSchema |
boolean |
False |
共通のアラート スキーマを使用するかどうかを示します。 |
ItsmReceiver
Itsm レシーバー。
| 名前 | 型 | 説明 |
|---|---|---|
| connectionId |
string |
上記のワークスペースで定義されている複数の間の ITSM 接続の一意の識別。 |
| name |
string |
Itsm レシーバーの名前。 名前は、アクション グループ内のすべての受信者で一意である必要があります。 |
| region |
string |
ワークスペースが存在するリージョン。 サポートされている値:'centralindia'、'japaneast'、'southeastasia'、'australiasoutheast'、'uksouth'、'westcentralus'、'canadacentral'、'eastus'、'westeurope' |
| ticketConfiguration |
string |
ITSM アクションの構成用の JSON BLOB。 CreateMultipleWorkItems オプションもこの BLOB の一部になります。 |
| workspaceId |
string |
OMS LA インスタンス識別子。 |
LogicAppReceiver
ロジック アプリレシーバー。
| 名前 | 型 | 規定値 | 説明 |
|---|---|---|---|
| callbackUrl |
string |
http 要求の送信先のコールバック URL。 |
|
| name |
string |
ロジック アプリレシーバーの名前。 名前は、アクション グループ内のすべての受信者で一意である必要があります。 |
|
| resourceId |
string |
ロジック アプリ レシーバーの Azure リソース ID。 |
|
| useCommonAlertSchema |
boolean |
False |
共通のアラート スキーマを使用するかどうかを示します。 |
NotificationRequestBody
連絡先の詳細メタデータを含む要求本文
| 名前 | 型 | 説明 |
|---|---|---|
| alertType |
string maxLength: 30 |
サポートされているアラートの種類の値。 サポートされているアラートの種類の値は、servicehealth、metricstaticthreshold、metricsdynamicthreshold、logalertv2、smartalert、webtestalert、logalertv1numresult、logalertv1metricmeasurement、resourcehealth、activitylog、actualcostbudget、forecastedbudget です。 |
| armRoleReceivers |
このアクション グループの一部である ARM ロール レシーバーの一覧。 ロールは Azure RBAC ロールであり、組み込みロールのみがサポートされています。 |
|
| automationRunbookReceivers |
このアクション グループの一部である AutomationRunbook レシーバーの一覧。 |
|
| azureAppPushReceivers |
このアクション グループの一部である AzureAppPush レシーバーの一覧。 |
|
| azureFunctionReceivers |
このアクション グループの一部である Azure 関数レシーバーの一覧。 |
|
| emailReceivers |
このアクション グループの一部である電子メール 受信者の一覧。 |
|
| eventHubReceivers |
このアクション グループの一部であるイベント ハブ レシーバーの一覧。 |
|
| itsmReceivers |
このアクション グループの一部である ITSM レシーバーの一覧。 |
|
| logicAppReceivers |
このアクション グループの一部であるロジック アプリレシーバーの一覧。 |
|
| smsReceivers |
このアクション グループの一部である SMS レシーバーの一覧。 |
|
| voiceReceivers |
このアクション グループの一部である音声レシーバーの一覧。 |
|
| webhookReceivers |
このアクション グループの一部である Webhook レシーバーの一覧。 |
ReceiverStatus
受信側の状態を示します。 有効になっていない受信者は、通信を受信しません。
| 値 | 説明 |
|---|---|
| NotSpecified | |
| Enabled | |
| Disabled |
SmsReceiver
SMS レシーバー。
| 名前 | 型 | 説明 |
|---|---|---|
| countryCode |
string |
SMS レシーバーの国コード。 |
| name |
string |
SMS レシーバーの名前。 名前は、アクション グループ内のすべての受信者で一意である必要があります。 |
| phoneNumber |
string |
SMS レシーバーの電話番号。 |
| status |
受信側の状態。 |
TestNotificationDetailsResponse
テスト通知の結果の詳細。
| 名前 | 型 | 説明 |
|---|---|---|
| actionDetails |
アクションの詳細の一覧 |
|
| completedTime |
string |
完了時刻 |
| context |
コンテキスト情報 |
|
| createdTime |
string |
作成時刻 |
| state |
string |
全体的な状態 |
VoiceReceiver
音声レシーバー。
| 名前 | 型 | 説明 |
|---|---|---|
| countryCode |
string |
音声レシーバーの国コード。 |
| name |
string |
音声レシーバーの名前。 名前は、アクション グループ内のすべての受信者で一意である必要があります。 |
| phoneNumber |
string |
音声レシーバーの電話番号。 |
WebhookReceiver
Webhook レシーバー。
| 名前 | 型 | 規定値 | 説明 |
|---|---|---|---|
| identifierUri |
string |
aad 認証の識別子 URI を示します。 |
|
| name |
string |
Webhook レシーバーの名前。 名前は、アクション グループ内のすべての受信者で一意である必要があります。 |
|
| objectId |
string |
aad 認証の webhook アプリ オブジェクト ID を示します。 |
|
| serviceUri |
string |
Webhook を送信する URI。 |
|
| tenantId |
string |
aad 認証のテナント ID を示します。 |
|
| useAadAuth |
boolean |
False |
AAD 認証を使用するかどうかを示します。 |
| useCommonAlertSchema |
boolean |
False |
共通のアラート スキーマを使用するかどうかを示します。 |