microsoft.insights activityLogAlerts 2017-03-01-preview

Remarks

For guidance on deploying monitoring solutions, see Create monitoring resources by using Bicep.

Bicep resource definition

The activityLogAlerts resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a microsoft.insights/activityLogAlerts resource, add the following Bicep to your template.

resource symbolicname 'microsoft.insights/activityLogAlerts@2017-03-01-preview' = {
  location: 'string'
  name: 'string'
  properties: {
    actions: {
      actionGroups: [
        {
          actionGroupId: 'string'
          webhookProperties: {
            {customized property}: 'string'
          }
        }
      ]
    }
    condition: {
      allOf: [
        {
          equals: 'string'
          field: 'string'
        }
      ]
    }
    description: 'string'
    enabled: bool
    scopes: [
      'string'
    ]
  }
  tags: {
    {customized property}: 'string'
  }
}

Property values

ActivityLogAlert

Name Description Value
actions The actions that will activate when the condition is met. ActivityLogAlertActionList (required)
condition The condition that will cause this alert to activate. ActivityLogAlertAllOfCondition (required)
description A description of this activity log alert. string
enabled Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated. bool
scopes A list of resourceIds that will be used as prefixes. The alert will only apply to activityLogs with resourceIds that fall under one of these prefixes. This list must include at least one item. string[] (required)

ActivityLogAlertActionGroup

Name Description Value
actionGroupId The resourceId of the action group. This cannot be null or empty. string (required)
webhookProperties The dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. ActivityLogAlertActionGroupWebhookProperties

ActivityLogAlertActionGroupWebhookProperties

Name Description Value

ActivityLogAlertActionList

Name Description Value
actionGroups The list of activity log alerts. ActivityLogAlertActionGroup[]

ActivityLogAlertAllOfCondition

Name Description Value
allOf The list of activity log alert conditions. ActivityLogAlertLeafCondition[] (required)

ActivityLogAlertLeafCondition

Name Description Value
equals The field value will be compared to this value (case-insensitive) to determine if the condition is met. string (required)
field The name of the field that this condition will examine. The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'. string (required)

microsoft.insights/activityLogAlerts

Name Description Value
location Resource location string (required)
name The resource name string (required)
properties An Azure activity log alert. ActivityLogAlert
tags Resource tags Dictionary of tag names and values. See Tags in templates

ResourceTags

Name Description Value

Quickstart samples

The following quickstart samples deploy this resource type.

Bicep File Description
AKS Cluster with a NAT Gateway and an Application Gateway This sample shows how to a deploy an AKS cluster with NAT Gateway for outbound connections and an Application Gateway for inbound connections.
AKS cluster with the Application Gateway Ingress Controller This sample shows how to deploy an AKS cluster with Application Gateway, Application Gateway Ingress Controller, Azure Container Registry, Log Analytics and Key Vault
Creates an Azure service alert This template creates an Azure service health alert that optionally sends emails to service administrators and specified email addresses in the event of cerain Azure service outages.

ARM template resource definition

The activityLogAlerts resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a microsoft.insights/activityLogAlerts resource, add the following JSON to your template.

{
  "type": "microsoft.insights/activityLogAlerts",
  "apiVersion": "2017-03-01-preview",
  "name": "string",
  "location": "string",
  "properties": {
    "actions": {
      "actionGroups": [
        {
          "actionGroupId": "string",
          "webhookProperties": {
            "{customized property}": "string"
          }
        }
      ]
    },
    "condition": {
      "allOf": [
        {
          "equals": "string",
          "field": "string"
        }
      ]
    },
    "description": "string",
    "enabled": "bool",
    "scopes": [ "string" ]
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property values

ActivityLogAlert

Name Description Value
actions The actions that will activate when the condition is met. ActivityLogAlertActionList (required)
condition The condition that will cause this alert to activate. ActivityLogAlertAllOfCondition (required)
description A description of this activity log alert. string
enabled Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated. bool
scopes A list of resourceIds that will be used as prefixes. The alert will only apply to activityLogs with resourceIds that fall under one of these prefixes. This list must include at least one item. string[] (required)

ActivityLogAlertActionGroup

Name Description Value
actionGroupId The resourceId of the action group. This cannot be null or empty. string (required)
webhookProperties The dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. ActivityLogAlertActionGroupWebhookProperties

ActivityLogAlertActionGroupWebhookProperties

Name Description Value

ActivityLogAlertActionList

Name Description Value
actionGroups The list of activity log alerts. ActivityLogAlertActionGroup[]

ActivityLogAlertAllOfCondition

Name Description Value
allOf The list of activity log alert conditions. ActivityLogAlertLeafCondition[] (required)

ActivityLogAlertLeafCondition

Name Description Value
equals The field value will be compared to this value (case-insensitive) to determine if the condition is met. string (required)
field The name of the field that this condition will examine. The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'. string (required)

microsoft.insights/activityLogAlerts

Name Description Value
apiVersion The api version '2017-03-01-preview'
location Resource location string (required)
name The resource name string (required)
properties An Azure activity log alert. ActivityLogAlert
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'microsoft.insights/activityLogAlerts'

ResourceTags

Name Description Value

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
AKS Cluster with a NAT Gateway and an Application Gateway

Deploy to Azure
This sample shows how to a deploy an AKS cluster with NAT Gateway for outbound connections and an Application Gateway for inbound connections.
AKS cluster with the Application Gateway Ingress Controller

Deploy to Azure
This sample shows how to deploy an AKS cluster with Application Gateway, Application Gateway Ingress Controller, Azure Container Registry, Log Analytics and Key Vault
Alert for misconfigured Key Vault on Application Gateway

Deploy to Azure
Use such templates to easily create some important event alerts for your Azure Application Gateway.
Create a Private AKS Cluster with a Public DNS Zone

Deploy to Azure
This sample shows how to a deploy a private AKS cluster with a Public DNS Zone.
Creates an Azure service alert

Deploy to Azure
This template creates an Azure service health alert that optionally sends emails to service administrators and specified email addresses in the event of cerain Azure service outages.
Deploy a Service Health Alert

Deploy to Azure
This template allows you to deploy a simple alert which uses an action group to send email notifications for any Service Health records in the Azure Activity Log
Deploy an Autoscale Activity Log Alert

Deploy to Azure
This template allows you to deploy a simple alert which uses an action group to send email notifications for any Autoscale records in the Azure Activity Log
Deploy an Autoscale Failed Activity Log Alert

Deploy to Azure
This template allows you to deploy a simple alert which uses an action group to send email notifications for any failed Autoscale records in the Azure Activity Log

Terraform (AzAPI provider) resource definition

The activityLogAlerts resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a microsoft.insights/activityLogAlerts resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "microsoft.insights/activityLogAlerts@2017-03-01-preview"
  name = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = jsonencode({
    properties = {
      actions = {
        actionGroups = [
          {
            actionGroupId = "string"
            webhookProperties = {
              {customized property} = "string"
            }
          }
        ]
      }
      condition = {
        allOf = [
          {
            equals = "string"
            field = "string"
          }
        ]
      }
      description = "string"
      enabled = bool
      scopes = [
        "string"
      ]
    }
  })
}

Property values

ActivityLogAlert

Name Description Value
actions The actions that will activate when the condition is met. ActivityLogAlertActionList (required)
condition The condition that will cause this alert to activate. ActivityLogAlertAllOfCondition (required)
description A description of this activity log alert. string
enabled Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated. bool
scopes A list of resourceIds that will be used as prefixes. The alert will only apply to activityLogs with resourceIds that fall under one of these prefixes. This list must include at least one item. string[] (required)

ActivityLogAlertActionGroup

Name Description Value
actionGroupId The resourceId of the action group. This cannot be null or empty. string (required)
webhookProperties The dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. ActivityLogAlertActionGroupWebhookProperties

ActivityLogAlertActionGroupWebhookProperties

Name Description Value

ActivityLogAlertActionList

Name Description Value
actionGroups The list of activity log alerts. ActivityLogAlertActionGroup[]

ActivityLogAlertAllOfCondition

Name Description Value
allOf The list of activity log alert conditions. ActivityLogAlertLeafCondition[] (required)

ActivityLogAlertLeafCondition

Name Description Value
equals The field value will be compared to this value (case-insensitive) to determine if the condition is met. string (required)
field The name of the field that this condition will examine. The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'. string (required)

microsoft.insights/activityLogAlerts

Name Description Value
location Resource location string (required)
name The resource name string (required)
properties An Azure activity log alert. ActivityLogAlert
tags Resource tags Dictionary of tag names and values.
type The resource type "microsoft.insights/activityLogAlerts@2017-03-01-preview"

ResourceTags

Name Description Value