Microsoft.AlertsManagement actionRules 2019-05-05-preview

Bicep resource definition

The actionRules resource type can be deployed to:

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

Resource format

To create a Microsoft.AlertsManagement/actionRules resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.AlertsManagement/actionRules@2019-05-05-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    conditions: {
      alertContext: {
        operator: 'string'
        values: [
          'string'
        ]
      }
      alertRuleId: {
        operator: 'string'
        values: [
          'string'
        ]
      }
      alertRuleName: {
        operator: 'string'
        values: [
          'string'
        ]
      }
      description: {
        operator: 'string'
        values: [
          'string'
        ]
      }
      monitorCondition: {
        operator: 'string'
        values: [
          'string'
        ]
      }
      monitorService: {
        operator: 'string'
        values: [
          'string'
        ]
      }
      severity: {
        operator: 'string'
        values: [
          'string'
        ]
      }
      targetResourceType: {
        operator: 'string'
        values: [
          'string'
        ]
      }
    }
    description: 'string'
    scope: {
      scopeType: 'string'
      values: [
        'string'
      ]
    }
    status: 'string'
    type: 'string'
    // For remaining properties, see ActionRuleProperties objects
  }
}

ActionRuleProperties objects

Set the type property to specify the type of object.

For ActionGroup, use:

  type: 'ActionGroup'
  actionGroupId: 'string'

For Diagnostics, use:

  type: 'Diagnostics'

For Suppression, use:

  type: 'Suppression'
  suppressionConfig: {
    recurrenceType: 'string'
    schedule: {
      endDate: 'string'
      endTime: 'string'
      recurrenceValues: [
        int
      ]
      startDate: 'string'
      startTime: 'string'
    }
  }

Property values

actionRules

Name Description Value
name The resource name string (required)
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
properties action rule properties ActionRuleProperties

ActionRuleProperties

Name Description Value
conditions conditions on which alerts will be filtered Conditions
description Description of action rule string
scope scope on which action rule will apply Scope
status Indicates if the given action rule is enabled or disabled 'Disabled'
'Enabled'
type Set the object type ActionGroup
Diagnostics
Suppression (required)

Conditions

Name Description Value
alertContext filter alerts by alert context (payload) Condition
alertRuleId filter alerts by alert rule id Condition
alertRuleName filter alerts by alert rule name Condition
description filter alerts by alert rule description Condition
monitorCondition filter alerts by monitor condition Condition
monitorService filter alerts by monitor service Condition
severity filter alerts by severity Condition
targetResourceType filter alerts by target resource type Condition

Condition

Name Description Value
operator operator for a given condition 'Contains'
'DoesNotContain'
'Equals'
'NotEquals'
values list of values to match for a given condition. string[]

Scope

Name Description Value
scopeType type of target scope 'Resource'
'ResourceGroup'
'Subscription'
values list of ARM IDs of the given scope type which will be the target of the given action rule. string[]

ActionGroup

Name Description Value
type Indicates type of action rule 'ActionGroup' (required)
actionGroupId Action group to trigger if action rule matches string (required)

Diagnostics

Name Description Value
type Indicates type of action rule 'Diagnostics' (required)

Suppression

Name Description Value
type Indicates type of action rule 'Suppression' (required)
suppressionConfig suppression configuration for the action rule SuppressionConfig (required)

SuppressionConfig

Name Description Value
recurrenceType Specifies when the suppression should be applied 'Always'
'Daily'
'Monthly'
'Once'
'Weekly' (required)
schedule suppression schedule configuration SuppressionSchedule

SuppressionSchedule

Name Description Value
endDate End date for suppression string
endTime End date for suppression string
recurrenceValues Specifies the values for recurrence pattern int[]
startDate Start date for suppression string
startTime Start time for suppression string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Setup notifications for backup alerts using Azure Monitor

Deploy to Azure
This template enables you to setup email notifications for your Recovery Services vaults using Azure Monitor, by deploying an alert processing rule and an action group

ARM template resource definition

The actionRules resource type can be deployed to:

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

Resource format

To create a Microsoft.AlertsManagement/actionRules resource, add the following JSON to your template.

{
  "type": "Microsoft.AlertsManagement/actionRules",
  "apiVersion": "2019-05-05-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "conditions": {
      "alertContext": {
        "operator": "string",
        "values": [ "string" ]
      },
      "alertRuleId": {
        "operator": "string",
        "values": [ "string" ]
      },
      "alertRuleName": {
        "operator": "string",
        "values": [ "string" ]
      },
      "description": {
        "operator": "string",
        "values": [ "string" ]
      },
      "monitorCondition": {
        "operator": "string",
        "values": [ "string" ]
      },
      "monitorService": {
        "operator": "string",
        "values": [ "string" ]
      },
      "severity": {
        "operator": "string",
        "values": [ "string" ]
      },
      "targetResourceType": {
        "operator": "string",
        "values": [ "string" ]
      }
    },
    "description": "string",
    "scope": {
      "scopeType": "string",
      "values": [ "string" ]
    },
    "status": "string",
    "type": "string"
    // For remaining properties, see ActionRuleProperties objects
  }
}

ActionRuleProperties objects

Set the type property to specify the type of object.

For ActionGroup, use:

  "type": "ActionGroup",
  "actionGroupId": "string"

For Diagnostics, use:

  "type": "Diagnostics"

For Suppression, use:

  "type": "Suppression",
  "suppressionConfig": {
    "recurrenceType": "string",
    "schedule": {
      "endDate": "string",
      "endTime": "string",
      "recurrenceValues": [ "int" ],
      "startDate": "string",
      "startTime": "string"
    }
  }

Property values

actionRules

Name Description Value
type The resource type 'Microsoft.AlertsManagement/actionRules'
apiVersion The resource api version '2019-05-05-preview'
name The resource name string (required)
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
properties action rule properties ActionRuleProperties

ActionRuleProperties

Name Description Value
conditions conditions on which alerts will be filtered Conditions
description Description of action rule string
scope scope on which action rule will apply Scope
status Indicates if the given action rule is enabled or disabled 'Disabled'
'Enabled'
type Set the object type ActionGroup
Diagnostics
Suppression (required)

Conditions

Name Description Value
alertContext filter alerts by alert context (payload) Condition
alertRuleId filter alerts by alert rule id Condition
alertRuleName filter alerts by alert rule name Condition
description filter alerts by alert rule description Condition
monitorCondition filter alerts by monitor condition Condition
monitorService filter alerts by monitor service Condition
severity filter alerts by severity Condition
targetResourceType filter alerts by target resource type Condition

Condition

Name Description Value
operator operator for a given condition 'Contains'
'DoesNotContain'
'Equals'
'NotEquals'
values list of values to match for a given condition. string[]

Scope

Name Description Value
scopeType type of target scope 'Resource'
'ResourceGroup'
'Subscription'
values list of ARM IDs of the given scope type which will be the target of the given action rule. string[]

ActionGroup

Name Description Value
type Indicates type of action rule 'ActionGroup' (required)
actionGroupId Action group to trigger if action rule matches string (required)

Diagnostics

Name Description Value
type Indicates type of action rule 'Diagnostics' (required)

Suppression

Name Description Value
type Indicates type of action rule 'Suppression' (required)
suppressionConfig suppression configuration for the action rule SuppressionConfig (required)

SuppressionConfig

Name Description Value
recurrenceType Specifies when the suppression should be applied 'Always'
'Daily'
'Monthly'
'Once'
'Weekly' (required)
schedule suppression schedule configuration SuppressionSchedule

SuppressionSchedule

Name Description Value
endDate End date for suppression string
endTime End date for suppression string
recurrenceValues Specifies the values for recurrence pattern int[]
startDate Start date for suppression string
startTime Start time for suppression string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Setup notifications for backup alerts using Azure Monitor

Deploy to Azure
This template enables you to setup email notifications for your Recovery Services vaults using Azure Monitor, by deploying an alert processing rule and an action group

Terraform (AzAPI provider) resource definition

The actionRules resource type can be deployed to:

  • Resource groups

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

Resource format

To create a Microsoft.AlertsManagement/actionRules resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.AlertsManagement/actionRules@2019-05-05-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      conditions = {
        alertContext = {
          operator = "string"
          values = [
            "string"
          ]
        }
        alertRuleId = {
          operator = "string"
          values = [
            "string"
          ]
        }
        alertRuleName = {
          operator = "string"
          values = [
            "string"
          ]
        }
        description = {
          operator = "string"
          values = [
            "string"
          ]
        }
        monitorCondition = {
          operator = "string"
          values = [
            "string"
          ]
        }
        monitorService = {
          operator = "string"
          values = [
            "string"
          ]
        }
        severity = {
          operator = "string"
          values = [
            "string"
          ]
        }
        targetResourceType = {
          operator = "string"
          values = [
            "string"
          ]
        }
      }
      description = "string"
      scope = {
        scopeType = "string"
        values = [
          "string"
        ]
      }
      status = "string"
      type = "string"
      // For remaining properties, see ActionRuleProperties objects
    }
  })
}

ActionRuleProperties objects

Set the type property to specify the type of object.

For ActionGroup, use:

  type = "ActionGroup"
  actionGroupId = "string"

For Diagnostics, use:

  type = "Diagnostics"

For Suppression, use:

  type = "Suppression"
  suppressionConfig = {
    recurrenceType = "string"
    schedule = {
      endDate = "string"
      endTime = "string"
      recurrenceValues = [
        int
      ]
      startDate = "string"
      startTime = "string"
    }
  }

Property values

actionRules

Name Description Value
type The resource type "Microsoft.AlertsManagement/actionRules@2019-05-05-preview"
name The resource name string (required)
location Resource location string (required)
parent_id To deploy to a resource group, use the ID of that resource group. string (required)
tags Resource tags Dictionary of tag names and values.
properties action rule properties ActionRuleProperties

ActionRuleProperties

Name Description Value
conditions conditions on which alerts will be filtered Conditions
description Description of action rule string
scope scope on which action rule will apply Scope
status Indicates if the given action rule is enabled or disabled "Disabled"
"Enabled"
type Set the object type ActionGroup
Diagnostics
Suppression (required)

Conditions

Name Description Value
alertContext filter alerts by alert context (payload) Condition
alertRuleId filter alerts by alert rule id Condition
alertRuleName filter alerts by alert rule name Condition
description filter alerts by alert rule description Condition
monitorCondition filter alerts by monitor condition Condition
monitorService filter alerts by monitor service Condition
severity filter alerts by severity Condition
targetResourceType filter alerts by target resource type Condition

Condition

Name Description Value
operator operator for a given condition "Contains"
"DoesNotContain"
"Equals"
"NotEquals"
values list of values to match for a given condition. string[]

Scope

Name Description Value
scopeType type of target scope "Resource"
"ResourceGroup"
"Subscription"
values list of ARM IDs of the given scope type which will be the target of the given action rule. string[]

ActionGroup

Name Description Value
type Indicates type of action rule "ActionGroup" (required)
actionGroupId Action group to trigger if action rule matches string (required)

Diagnostics

Name Description Value
type Indicates type of action rule "Diagnostics" (required)

Suppression

Name Description Value
type Indicates type of action rule "Suppression" (required)
suppressionConfig suppression configuration for the action rule SuppressionConfig (required)

SuppressionConfig

Name Description Value
recurrenceType Specifies when the suppression should be applied "Always"
"Daily"
"Monthly"
"Once"
"Weekly" (required)
schedule suppression schedule configuration SuppressionSchedule

SuppressionSchedule

Name Description Value
endDate End date for suppression string
endTime End date for suppression string
recurrenceValues Specifies the values for recurrence pattern int[]
startDate Start date for suppression string
startTime Start time for suppression string