Action Groups - Post Test Notifications

제공된 수신기 집합에 테스트 알림 보내기

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications?api-version=2021-09-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
subscriptionId
path True

string

대상 구독의 ID입니다.

api-version
query True

string

이 작업에 사용할 API 버전입니다.

요청 본문

Name 필수 형식 Description
alertType True

string

지원되는 경고 유형의 값입니다. 지원되는 경고 유형 값은 servicehealth, metricstaticthreshold, metricsdynamicthreshold, logalertv2, smartalert, webtestalert, logalertv1numresult, logalertv1metricmeasurement, resourcehealth, activitylog, actualcostbudget, forecastedbudget입니다.

armRoleReceivers

ArmRoleReceiver[]

이 작업 그룹의 일부인 ARM 역할 수신기 목록입니다. 역할은 Azure RBAC 역할이며 기본 제공 역할만 지원됩니다.

automationRunbookReceivers

AutomationRunbookReceiver[]

이 작업 그룹의 일부인 AutomationRunbook 수신기 목록입니다.

azureAppPushReceivers

AzureAppPushReceiver[]

이 작업 그룹의 일부인 AzureAppPush 수신기 목록입니다.

azureFunctionReceivers

AzureFunctionReceiver[]

이 작업 그룹의 일부인 Azure 함수 수신기 목록입니다.

emailReceivers

EmailReceiver[]

이 작업 그룹의 일부인 전자 메일 수신자 목록입니다.

eventHubReceivers

EventHubReceiver[]

이 작업 그룹의 일부인 이벤트 허브 수신기 목록입니다.

itsmReceivers

ItsmReceiver[]

이 작업 그룹의 일부인 ITSM 수신기 목록입니다.

logicAppReceivers

LogicAppReceiver[]

이 작업 그룹의 일부인 논리 앱 수신기 목록입니다.

smsReceivers

SmsReceiver[]

이 작업 그룹의 일부인 SMS 수신자 목록입니다.

voiceReceivers

VoiceReceiver[]

이 작업 그룹의 일부인 음성 수신기 목록입니다.

webhookReceivers

WebhookReceiver[]

이 작업 그룹의 일부인 웹후크 수신기 목록입니다.

응답

Name 형식 Description
200 OK

TestNotificationDetailsResponse

알림이 성공했습니다.

202 Accepted

알림 요청이 수락됨

Headers

location: string

Other Status Codes

ErrorResponse

테스트 알림을 보내는 동안 오류가 발생했습니다.

보안

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation 사용자 계정 가장

예제

Create notifications at subscription level

Sample Request

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
    }
  ]
}

Sample Response

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
    }
  ]
}

정의

Name Description
ActionDetail

작업 세부 정보

ArmRoleReceiver

arm 역할 수신기입니다.

AutomationRunbookReceiver

Azure Automation Runbook 알림 수신기입니다.

AzureAppPushReceiver

Azure 모바일 앱 푸시 알림 수신기.

AzureFunctionReceiver

azure 함수 수신기입니다.

Context

컨텍스트 정보

EmailReceiver

전자 메일 수신자입니다.

ErrorResponse

오류 응답의 형식을 설명합니다.

EventHubReceiver

이벤트 허브 수신기입니다.

ItsmReceiver

Itsm 수신기입니다.

LogicAppReceiver

논리 앱 수신기입니다.

NotificationRequestBody

연락처 세부 정보 메타데이터가 포함된 요청 본문

ReceiverStatus

수신기의 상태 나타냅니다. 사용하도록 설정되지 않은 수신기는 통신을 받지 않습니다.

SmsReceiver

SMS 수신자입니다.

TestNotificationDetailsResponse

테스트 알림 결과의 세부 정보입니다.

VoiceReceiver

음성 수신기.

WebhookReceiver

웹후크 수신기입니다.

ActionDetail

작업 세부 정보

Name 형식 Description
Detail

string

친숙한 오류 메시지의 세부 정보

MechanismType

string

메커니즘 유형

Name

string

작업의 이름입니다.

SendTime

string

송신 시간

Status

string

작업의 상태

SubState

string

작업의 하위 상태

ArmRoleReceiver

arm 역할 수신기입니다.

Name 형식 기본값 Description
name

string

arm 역할 수신기의 이름입니다. 이름은 작업 그룹 내의 모든 수신기에서 고유해야 합니다.

roleId

string

arm 역할 ID입니다.

useCommonAlertSchema

boolean

False

일반적인 경고 스키마를 사용할지 여부를 나타냅니다.

AutomationRunbookReceiver

Azure Automation Runbook 알림 수신기입니다.

Name 형식 기본값 Description
automationAccountId

string

이 Runbook을 보유하고 Azure 리소스에 인증하는 Azure Automation 계정 ID입니다.

isGlobalRunbook

boolean

이 instance 전역 Runbook인지 여부를 나타냅니다.

name

string

웹후크의 이름을 나타냅니다.

runbookName

string

이 Runbook의 이름입니다.

serviceUri

string

웹후크를 보내야 하는 URI입니다.

useCommonAlertSchema

boolean

False

일반적인 경고 스키마를 사용할지 여부를 나타냅니다.

webhookResourceId

string

이 Runbook에 연결된 웹후크의 리소스 ID입니다.

AzureAppPushReceiver

Azure 모바일 앱 푸시 알림 수신기.

Name 형식 Description
emailAddress

string

Azure 모바일 앱에 등록된 이메일 주소입니다.

name

string

Azure 모바일 앱 푸시 수신기의 이름입니다. 이름은 작업 그룹 내의 모든 수신기에서 고유해야 합니다.

AzureFunctionReceiver

azure 함수 수신기입니다.

Name 형식 기본값 Description
functionAppResourceId

string

함수 앱의 azure 리소스 ID입니다.

functionName

string

함수 앱의 함수 이름입니다.

httpTriggerUrl

string

http 요청이 전송되는 http 트리거 URL입니다.

name

string

azure 함수 수신기의 이름입니다. 이름은 작업 그룹 내의 모든 수신기에서 고유해야 합니다.

useCommonAlertSchema

boolean

False

일반적인 경고 스키마를 사용할지 여부를 나타냅니다.

Context

컨텍스트 정보

Name 형식 Description
contextType

string

컨텍스트 ID 형식

notificationSource

string

알림 요청의 원본

EmailReceiver

전자 메일 수신자입니다.

Name 형식 기본값 Description
emailAddress

string

이 수신자의 이메일 주소입니다.

name

string

전자 메일 수신자의 이름입니다. 이름은 작업 그룹 내의 모든 수신기에서 고유해야 합니다.

status

ReceiverStatus

수신자가 전자 메일의 상태.

useCommonAlertSchema

boolean

False

일반적인 경고 스키마를 사용할지 여부를 나타냅니다.

ErrorResponse

오류 응답의 형식을 설명합니다.

Name 형식 Description
code

string

오류 코드

message

string

작업이 실패한 이유를 나타내는 오류 메시지입니다.

EventHubReceiver

이벤트 허브 수신기입니다.

Name 형식 기본값 Description
eventHubName

string

특정 Event Hub 큐의 이름

eventHubNameSpace

string

Event Hub 네임스페이스

name

string

이벤트 허브 수신기의 이름입니다. 이름은 작업 그룹 내의 모든 수신기에서 고유해야 합니다.

subscriptionId

string

이 이벤트 허브를 포함하는 구독의 ID

tenantId

string

이 이벤트 허브를 포함하는 구독의 테넌트 ID

useCommonAlertSchema

boolean

False

일반적인 경고 스키마를 사용할지 여부를 나타냅니다.

ItsmReceiver

Itsm 수신기입니다.

Name 형식 Description
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 instance 식별자입니다.

LogicAppReceiver

논리 앱 수신기입니다.

Name 형식 기본값 Description
callbackUrl

string

http 요청이 전송된 콜백 URL입니다.

name

string

논리 앱 수신기의 이름입니다. 이름은 작업 그룹 내의 모든 수신기에서 고유해야 합니다.

resourceId

string

논리 앱 수신기의 azure 리소스 ID입니다.

useCommonAlertSchema

boolean

False

일반적인 경고 스키마를 사용할지 여부를 나타냅니다.

NotificationRequestBody

연락처 세부 정보 메타데이터가 포함된 요청 본문

Name 형식 Description
alertType

string

지원되는 경고 유형의 값입니다. 지원되는 경고 유형 값은 servicehealth, metricstaticthreshold, metricsdynamicthreshold, logalertv2, smartalert, webtestalert, logalertv1numresult, logalertv1metricmeasurement, resourcehealth, activitylog, actualcostbudget, forecastedbudget입니다.

armRoleReceivers

ArmRoleReceiver[]

이 작업 그룹의 일부인 ARM 역할 수신기 목록입니다. 역할은 Azure RBAC 역할이며 기본 제공 역할만 지원됩니다.

automationRunbookReceivers

AutomationRunbookReceiver[]

이 작업 그룹의 일부인 AutomationRunbook 수신기 목록입니다.

azureAppPushReceivers

AzureAppPushReceiver[]

이 작업 그룹의 일부인 AzureAppPush 수신기 목록입니다.

azureFunctionReceivers

AzureFunctionReceiver[]

이 작업 그룹의 일부인 Azure 함수 수신기 목록입니다.

emailReceivers

EmailReceiver[]

이 작업 그룹의 일부인 이메일 수신자 목록입니다.

eventHubReceivers

EventHubReceiver[]

이 작업 그룹의 일부인 이벤트 허브 수신기 목록입니다.

itsmReceivers

ItsmReceiver[]

이 작업 그룹의 일부인 ITSM 수신기 목록입니다.

logicAppReceivers

LogicAppReceiver[]

이 작업 그룹의 일부인 논리 앱 수신기 목록입니다.

smsReceivers

SmsReceiver[]

이 작업 그룹의 일부인 SMS 수신자 목록입니다.

voiceReceivers

VoiceReceiver[]

이 작업 그룹의 일부인 음성 수신기 목록입니다.

webhookReceivers

WebhookReceiver[]

이 작업 그룹의 일부인 웹후크 수신기 목록입니다.

ReceiverStatus

수신기의 상태 나타냅니다. 사용하도록 설정되지 않은 수신기는 통신을 받지 않습니다.

Name 형식 Description
Disabled

string

Enabled

string

NotSpecified

string

SmsReceiver

SMS 수신자입니다.

Name 형식 Description
countryCode

string

SMS 수신자의 국가 코드입니다.

name

string

SMS 수신자의 이름입니다. 이름은 작업 그룹 내의 모든 수신기에서 고유해야 합니다.

phoneNumber

string

SMS 수신자의 전화 번호입니다.

status

ReceiverStatus

수신기의 상태.

TestNotificationDetailsResponse

테스트 알림 결과의 세부 정보입니다.

Name 형식 Description
actionDetails

ActionDetail[]

작업 세부 정보 목록

completedTime

string

완료된 시간

context

Context

컨텍스트 정보

createdTime

string

만든 시간

state

string

전체 상태

VoiceReceiver

음성 수신기.

Name 형식 Description
countryCode

string

음성 수신기의 국가 코드입니다.

name

string

음성 수신기의 이름입니다. 이름은 작업 그룹 내의 모든 수신기에서 고유해야 합니다.

phoneNumber

string

음성 수신기의 전화 번호입니다.

WebhookReceiver

웹후크 수신기입니다.

Name 형식 기본값 Description
identifierUri

string

aad 인증의 식별자 URI를 나타냅니다.

name

string

웹후크 수신기의 이름입니다. 이름은 작업 그룹 내의 모든 수신기에서 고유해야 합니다.

objectId

string

aad 인증에 대한 웹후크 앱 개체 ID를 나타냅니다.

serviceUri

string

웹후크를 보내야 하는 URI입니다.

tenantId

string

aad 인증에 대한 테넌트 ID를 나타냅니다.

useAadAuth

boolean

False

AAD 인증을 사용할지 여부를 나타냅니다.

useCommonAlertSchema

boolean

False

일반적인 경고 스키마를 사용할지 여부를 나타냅니다.