The actionRules resource type can be deployed to:
For a list of changed properties in each API version, see change log.
To create a Microsoft.AlertsManagement/actionRules resource, add the following JSON to your template.
{
"type": "Microsoft.AlertsManagement/actionRules",
"apiVersion": "2021-08-08",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"properties": {
"actions": [
{
"actionType": "string"
// For remaining properties, see Action objects
}
],
"conditions": [
{
"field": "string",
"operator": "string",
"values": [ "string" ]
}
],
"description": "string",
"enabled": "bool",
"schedule": {
"effectiveFrom": "string",
"effectiveUntil": "string",
"recurrences": [
{
"endTime": "string",
"startTime": "string",
"recurrenceType": "string"
// For remaining properties, see Recurrence objects
}
],
"timeZone": "string"
},
"scopes": [ "string" ]
}
}
Set the actionType property to specify the type of object.
For AddActionGroups, use:
"actionType": "AddActionGroups",
"actionGroupIds": [ "string" ]
For RemoveAllActionGroups, use:
"actionType": "RemoveAllActionGroups"
Set the recurrenceType property to specify the type of object.
For Daily, use:
"recurrenceType": "Daily"
For Monthly, use:
"recurrenceType": "Monthly",
"daysOfMonth": [ "int" ]
For Weekly, use:
"recurrenceType": "Weekly",
"daysOfWeek": [ "string" ]
Name | Description | Value |
---|---|---|
type | The resource type | 'Microsoft.AlertsManagement/actionRules' |
apiVersion | The resource api version | '2021-08-08' |
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 | Alert processing rule properties. | AlertProcessingRuleProperties |
Name | Description | Value |
---|---|---|
actions | Actions to be applied. | Action[] (required) |
conditions | Conditions on which alerts will be filtered. | Condition[] |
description | Description of alert processing rule. | string |
enabled | Indicates if the given alert processing rule is enabled or disabled. | bool |
schedule | Scheduling for alert processing rule. | Schedule |
scopes | Scopes on which alert processing rule will apply. | string[] (required) |
Name | Description | Value |
---|---|---|
actionType | Set the object type | AddActionGroups RemoveAllActionGroups (required) |
Name | Description | Value |
---|---|---|
actionType | Action that should be applied. | 'AddActionGroups' (required) |
actionGroupIds | List of action group Ids to add to alert processing rule. | string[] (required) |
Name | Description | Value |
---|---|---|
actionType | Action that should be applied. | 'RemoveAllActionGroups' (required) |
Name | Description | Value |
---|---|---|
field | Field for a given condition. | 'AlertContext' 'AlertRuleId' 'AlertRuleName' 'Description' 'MonitorCondition' 'MonitorService' 'Severity' 'SignalType' 'TargetResource' 'TargetResourceGroup' 'TargetResourceType' |
operator | Operator for a given condition. | 'Contains' 'DoesNotContain' 'Equals' 'NotEquals' |
values | List of values to match for a given condition. | string[] |
Name | Description | Value |
---|---|---|
effectiveFrom | Scheduling effective from time. Date-Time in ISO-8601 format without timezone suffix. | string |
effectiveUntil | Scheduling effective until time. Date-Time in ISO-8601 format without timezone suffix. | string |
recurrences | List of recurrences. | Recurrence[] |
timeZone | Scheduling time zone. | string |
Name | Description | Value |
---|---|---|
endTime | End time for recurrence. | string |
startTime | Start time for recurrence. | string |
recurrenceType | Set the object type | Daily Monthly Weekly (required) |
Name | Description | Value |
---|---|---|
recurrenceType | Specifies when the recurrence should be applied. | 'Daily' (required) |
Name | Description | Value |
---|---|---|
recurrenceType | Specifies when the recurrence should be applied. | 'Monthly' (required) |
daysOfMonth | Specifies the values for monthly recurrence pattern. | int[] (required) |
Name | Description | Value |
---|---|---|
recurrenceType | Specifies when the recurrence should be applied. | 'Weekly' (required) |
daysOfWeek | Specifies the values for weekly recurrence pattern. | String array containing any of: 'Friday' 'Monday' 'Saturday' 'Sunday' 'Thursday' 'Tuesday' 'Wednesday' (required) |
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
Setup notifications for backup alerts using Azure Monitor |
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 |