Action Groups - Create Or Update
Create a new action group or update an existing one.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}?api-version=2021-09-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
action
|
path | True |
string |
The name of the action group. |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string |
The ID of the target subscription. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
location | True |
string |
Resource location |
properties.enabled | True |
boolean |
Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. |
properties.groupShortName | True |
string |
The short name of the action group. This will be used in SMS messages. |
properties.armRoleReceivers |
The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. |
||
properties.automationRunbookReceivers |
The list of AutomationRunbook receivers that are part of this action group. |
||
properties.azureAppPushReceivers |
The list of AzureAppPush receivers that are part of this action group. |
||
properties.azureFunctionReceivers |
The list of azure function receivers that are part of this action group. |
||
properties.emailReceivers |
The list of email receivers that are part of this action group. |
||
properties.eventHubReceivers |
The list of event hub receivers that are part of this action group. |
||
properties.itsmReceivers |
The list of ITSM receivers that are part of this action group. |
||
properties.logicAppReceivers |
The list of logic app receivers that are part of this action group. |
||
properties.smsReceivers |
The list of SMS receivers that are part of this action group. |
||
properties.voiceReceivers |
The list of voice receivers that are part of this action group. |
||
properties.webhookReceivers |
The list of webhook receivers that are part of this action group. |
||
tags |
object |
Resource tags |
Responses
Name | Type | Description |
---|---|---|
200 OK |
An existing action group was successfully updated. |
|
201 Created |
A new action group was successfully created. |
|
Other Status Codes |
An error occurred and the action group could not be created or updated. |
Security
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 | impersonate your user account |
Examples
Create or update an action group
Sample request
PUT https://management.azure.com/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/Microsoft.Insights/actionGroups/SampleActionGroup?api-version=2021-09-01
{
"location": "Global",
"tags": {},
"properties": {
"groupShortName": "sample",
"enabled": true,
"emailReceivers": [
{
"name": "John Doe's email",
"emailAddress": "[email protected]",
"useCommonAlertSchema": false
},
{
"name": "Jane Smith's email",
"emailAddress": "[email protected]",
"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": "[email protected]"
}
],
"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": "<serviceUri>",
"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
}
],
"armRoleReceivers": [
{
"name": "Sample armRole",
"roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635",
"useCommonAlertSchema": true
}
],
"eventHubReceivers": [
{
"name": "Sample eventHub",
"eventHubNameSpace": "testEventHubNameSpace",
"eventHubName": "testEventHub",
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84"
}
]
}
}
Sample response
{
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup",
"type": "Microsoft.Insights/ActionGroups",
"name": "SampleActionGroup",
"location": "Global",
"tags": {},
"properties": {
"groupShortName": "sample",
"enabled": true,
"emailReceivers": [
{
"name": "John Doe's email",
"emailAddress": "[email protected]",
"status": "Enabled",
"useCommonAlertSchema": false
},
{
"name": "Jane Smith's email",
"emailAddress": "[email protected]",
"status": "Enabled",
"useCommonAlertSchema": true
}
],
"smsReceivers": [
{
"name": "John Doe's mobile",
"countryCode": "1",
"phoneNumber": "1234567890",
"status": "Enabled"
},
{
"name": "Jane Smith's mobile",
"countryCode": "1",
"phoneNumber": "0987654321",
"status": "Enabled"
}
],
"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": "[email protected]"
}
],
"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": "<serviceUri>",
"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": "<httpTriggerUrl>",
"useCommonAlertSchema": true
}
],
"armRoleReceivers": [
{
"name": "Sample armRole",
"roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635",
"useCommonAlertSchema": true
}
],
"eventHubReceivers": [
{
"name": "Sample eventHub",
"eventHubNameSpace": "testEventHubNameSpace",
"eventHubName": "testEventHub",
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84",
"useCommonAlertSchema": false
}
]
}
}
{
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup",
"type": "Microsoft.Insights/ActionGroups",
"name": "SampleActionGroup",
"location": "Global",
"tags": {},
"properties": {
"groupShortName": "sample",
"enabled": true,
"emailReceivers": [
{
"name": "John Doe's email",
"emailAddress": "[email protected]",
"status": "Enabled",
"useCommonAlertSchema": false
},
{
"name": "Jane Smith's email",
"emailAddress": "[email protected]",
"status": "Enabled",
"useCommonAlertSchema": true
}
],
"smsReceivers": [
{
"name": "John Doe's mobile",
"countryCode": "1",
"phoneNumber": "1234567890",
"status": "Enabled"
},
{
"name": "Jane Smith's mobile",
"countryCode": "1",
"phoneNumber": "0987654321",
"status": "Enabled"
}
],
"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": "[email protected]"
}
],
"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": "<serviceUri>",
"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": "<httpTriggerUrl>",
"useCommonAlertSchema": true
}
],
"armRoleReceivers": [
{
"name": "Sample armRole",
"roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635",
"useCommonAlertSchema": true
}
],
"eventHubReceivers": [
{
"name": "Sample eventHub",
"eventHubNameSpace": "testEventHubNameSpace",
"eventHubName": "testEventHub",
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d",
"tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84",
"useCommonAlertSchema": false
}
]
}
}
Definitions
Name | Description |
---|---|
Action |
An action group resource. |
Arm |
An arm role receiver. |
Automation |
The Azure Automation Runbook notification receiver. |
Azure |
The Azure mobile App push notification receiver. |
Azure |
An azure function receiver. |
Email |
An email receiver. |
Error |
Describes the format of Error response. |
Event |
An Event hub receiver. |
Itsm |
An Itsm receiver. |
Logic |
A logic app receiver. |
Receiver |
Indicates the status of the receiver. Receivers that are not Enabled will not receive any communications. |
Sms |
An SMS receiver. |
Voice |
A voice receiver. |
Webhook |
A webhook receiver. |
ActionGroupResource
An action group resource.
Name | Type | Default value | Description |
---|---|---|---|
id |
string |
Azure resource Id |
|
location |
string |
Resource location |
|
name |
string |
Azure resource name |
|
properties.armRoleReceivers |
The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. |
||
properties.automationRunbookReceivers |
The list of AutomationRunbook receivers that are part of this action group. |
||
properties.azureAppPushReceivers |
The list of AzureAppPush receivers that are part of this action group. |
||
properties.azureFunctionReceivers |
The list of azure function receivers that are part of this action group. |
||
properties.emailReceivers |
The list of email receivers that are part of this action group. |
||
properties.enabled |
boolean |
True |
Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. |
properties.eventHubReceivers |
The list of event hub receivers that are part of this action group. |
||
properties.groupShortName |
string |
The short name of the action group. This will be used in SMS messages. |
|
properties.itsmReceivers |
The list of ITSM receivers that are part of this action group. |
||
properties.logicAppReceivers |
The list of logic app receivers that are part of this action group. |
||
properties.smsReceivers |
The list of SMS receivers that are part of this action group. |
||
properties.voiceReceivers |
The list of voice receivers that are part of this action group. |
||
properties.webhookReceivers |
The list of webhook receivers that are part of this action group. |
||
tags |
object |
Resource tags |
|
type |
string |
Azure resource type |
ArmRoleReceiver
An arm role receiver.
Name | Type | Default value | Description |
---|---|---|---|
name |
string |
The name of the arm role receiver. Names must be unique across all receivers within an action group. |
|
roleId |
string |
The arm role id. |
|
useCommonAlertSchema |
boolean |
False |
Indicates whether to use common alert schema. |
AutomationRunbookReceiver
The Azure Automation Runbook notification receiver.
Name | Type | Default value | Description |
---|---|---|---|
automationAccountId |
string |
The Azure automation account Id which holds this runbook and authenticate to Azure resource. |
|
isGlobalRunbook |
boolean |
Indicates whether this instance is global runbook. |
|
name |
string |
Indicates name of the webhook. |
|
runbookName |
string |
The name for this runbook. |
|
serviceUri |
string |
The URI where webhooks should be sent. |
|
useCommonAlertSchema |
boolean |
False |
Indicates whether to use common alert schema. |
webhookResourceId |
string |
The resource id for webhook linked to this runbook. |
AzureAppPushReceiver
The Azure mobile App push notification receiver.
Name | Type | Description |
---|---|---|
emailAddress |
string |
The email address registered for the Azure mobile app. |
name |
string |
The name of the Azure mobile app push receiver. Names must be unique across all receivers within an action group. |
AzureFunctionReceiver
An azure function receiver.
Name | Type | Default value | Description |
---|---|---|---|
functionAppResourceId |
string |
The azure resource id of the function app. |
|
functionName |
string |
The function name in the function app. |
|
httpTriggerUrl |
string |
The http trigger url where http request sent to. |
|
name |
string |
The name of the azure function receiver. Names must be unique across all receivers within an action group. |
|
useCommonAlertSchema |
boolean |
False |
Indicates whether to use common alert schema. |
EmailReceiver
An email receiver.
Name | Type | Default value | Description |
---|---|---|---|
emailAddress |
string |
The email address of this receiver. |
|
name |
string |
The name of the email receiver. Names must be unique across all receivers within an action group. |
|
status |
The receiver status of the e-mail. |
||
useCommonAlertSchema |
boolean |
False |
Indicates whether to use common alert schema. |
ErrorResponse
Describes the format of Error response.
Name | Type | Description |
---|---|---|
code |
string |
Error code |
message |
string |
Error message indicating why the operation failed. |
EventHubReceiver
An Event hub receiver.
Name | Type | Default value | Description |
---|---|---|---|
eventHubName |
string |
The name of the specific Event Hub queue |
|
eventHubNameSpace |
string |
The Event Hub namespace |
|
name |
string |
The name of the Event hub receiver. Names must be unique across all receivers within an action group. |
|
subscriptionId |
string |
The Id for the subscription containing this event hub |
|
tenantId |
string |
The tenant Id for the subscription containing this event hub |
|
useCommonAlertSchema |
boolean |
False |
Indicates whether to use common alert schema. |
ItsmReceiver
An Itsm receiver.
Name | Type | Description |
---|---|---|
connectionId |
string |
Unique identification of ITSM connection among multiple defined in above workspace. |
name |
string |
The name of the Itsm receiver. Names must be unique across all receivers within an action group. |
region |
string |
Region in which workspace resides. Supported values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope' |
ticketConfiguration |
string |
JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well. |
workspaceId |
string |
OMS LA instance identifier. |
LogicAppReceiver
A logic app receiver.
Name | Type | Default value | Description |
---|---|---|---|
callbackUrl |
string |
The callback url where http request sent to. |
|
name |
string |
The name of the logic app receiver. Names must be unique across all receivers within an action group. |
|
resourceId |
string |
The azure resource id of the logic app receiver. |
|
useCommonAlertSchema |
boolean |
False |
Indicates whether to use common alert schema. |
ReceiverStatus
Indicates the status of the receiver. Receivers that are not Enabled will not receive any communications.
Name | Type | Description |
---|---|---|
Disabled |
string |
|
Enabled |
string |
|
NotSpecified |
string |
SmsReceiver
An SMS receiver.
Name | Type | Description |
---|---|---|
countryCode |
string |
The country code of the SMS receiver. |
name |
string |
The name of the SMS receiver. Names must be unique across all receivers within an action group. |
phoneNumber |
string |
The phone number of the SMS receiver. |
status |
The status of the receiver. |
VoiceReceiver
A voice receiver.
Name | Type | Description |
---|---|---|
countryCode |
string |
The country code of the voice receiver. |
name |
string |
The name of the voice receiver. Names must be unique across all receivers within an action group. |
phoneNumber |
string |
The phone number of the voice receiver. |
WebhookReceiver
A webhook receiver.
Name | Type | Default value | Description |
---|---|---|---|
identifierUri |
string |
Indicates the identifier uri for aad auth. |
|
name |
string |
The name of the webhook receiver. Names must be unique across all receivers within an action group. |
|
objectId |
string |
Indicates the webhook app object Id for aad auth. |
|
serviceUri |
string |
The URI where webhooks should be sent. |
|
tenantId |
string |
Indicates the tenant id for aad auth. |
|
useAadAuth |
boolean |
False |
Indicates whether or not use AAD authentication. |
useCommonAlertSchema |
boolean |
False |
Indicates whether to use common alert schema. |