Action Groups - List By Subscription Id

Get a list of all action groups in a subscription.

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

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

ActionGroupList

The request succeeded.

Other Status Codes

ErrorResponse

An error occurred and the list of action groups could not be retrieved.

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

List action groups at subscription level

Sample request

GET https://management.azure.com/subscriptions/187f412d-1758-44d9-b052-169e2564721d/providers/Microsoft.Insights/actionGroups?api-version=2021-09-01

Sample response

{
  "value": [
    {
      "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": "johndoe@email.com",
            "status": "Enabled",
            "useCommonAlertSchema": true
          },
          {
            "name": "Jane Smith's email",
            "emailAddress": "janesmith@email.com",
            "status": "Disabled",
            "useCommonAlertSchema": true
          }
        ],
        "smsReceivers": [
          {
            "name": "John Doe's mobile",
            "countryCode": "1",
            "phoneNumber": "1234567890",
            "status": "Disabled"
          },
          {
            "name": "Jane Smith's mobile",
            "countryCode": "1",
            "phoneNumber": "0987654321",
            "status": "Enabled"
          }
        ],
        "webhookReceivers": [
          {
            "name": "Sample webhook",
            "serviceUri": "http://www.example.com/webhook",
            "useCommonAlertSchema": false
          },
          {
            "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": [],
        "azureAppPushReceivers": [],
        "automationRunbookReceivers": [],
        "voiceReceivers": [],
        "logicAppReceivers": [],
        "azureFunctionReceivers": [],
        "armRoleReceivers": [],
        "eventHubReceivers": []
      }
    },
    {
      "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup2",
      "type": "Microsoft.Insights/ActionGroups",
      "name": "SampleActionGroup2",
      "location": "Global",
      "tags": {},
      "properties": {
        "groupShortName": "sample2",
        "enabled": false,
        "emailReceivers": [
          {
            "name": "John Doe's email",
            "emailAddress": "johndoe@email.com",
            "status": "Enabled",
            "useCommonAlertSchema": true
          }
        ],
        "smsReceivers": [
          {
            "name": "Jane Smith's mobile",
            "countryCode": "1",
            "phoneNumber": "0987654321",
            "status": "Enabled"
          }
        ],
        "webhookReceivers": [],
        "itsmReceivers": [],
        "azureAppPushReceivers": [],
        "automationRunbookReceivers": [],
        "voiceReceivers": [],
        "logicAppReceivers": [],
        "azureFunctionReceivers": [],
        "armRoleReceivers": [],
        "eventHubReceivers": []
      }
    }
  ]
}

Definitions

Name Description
ActionGroupList

A list of action groups.

ActionGroupResource

An action group resource.

ArmRoleReceiver

An arm role receiver.

AutomationRunbookReceiver

The Azure Automation Runbook notification receiver.

AzureAppPushReceiver

The Azure mobile App push notification receiver.

AzureFunctionReceiver

An azure function receiver.

EmailReceiver

An email receiver.

ErrorResponse

Describes the format of Error response.

EventHubReceiver

An Event hub receiver.

ItsmReceiver

An Itsm receiver.

LogicAppReceiver

A logic app receiver.

ReceiverStatus

Indicates the status of the receiver. Receivers that are not Enabled will not receive any communications.

SmsReceiver

An SMS receiver.

VoiceReceiver

A voice receiver.

WebhookReceiver

A webhook receiver.

ActionGroupList

A list of action groups.

Name Type Description
nextLink

string

Provides the link to retrieve the next set of elements.

value

ActionGroupResource[]

The list of action groups.

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

ArmRoleReceiver[]

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

AutomationRunbookReceiver[]

The list of AutomationRunbook receivers that are part of this action group.

properties.azureAppPushReceivers

AzureAppPushReceiver[]

The list of AzureAppPush receivers that are part of this action group.

properties.azureFunctionReceivers

AzureFunctionReceiver[]

The list of azure function receivers that are part of this action group.

properties.emailReceivers

EmailReceiver[]

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

EventHubReceiver[]

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

ItsmReceiver[]

The list of ITSM receivers that are part of this action group.

properties.logicAppReceivers

LogicAppReceiver[]

The list of logic app receivers that are part of this action group.

properties.smsReceivers

SmsReceiver[]

The list of SMS receivers that are part of this action group.

properties.voiceReceivers

VoiceReceiver[]

The list of voice receivers that are part of this action group.

properties.webhookReceivers

WebhookReceiver[]

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

ReceiverStatus

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

ReceiverStatus

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.