Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The actionRules resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
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' = {
location: 'string'
name: 'string'
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
}
tags: {
{customized property}: 'string'
}
}
ActionRuleProperties objects
Set the type property to specify the type of object.
For ActionGroup, use:
{
actionGroupId: 'string'
type: 'ActionGroup'
}
For Diagnostics, use:
{
type: 'Diagnostics'
}
For Suppression, use:
{
suppressionConfig: {
recurrenceType: 'string'
schedule: {
endDate: 'string'
endTime: 'string'
recurrenceValues: [
int
]
startDate: 'string'
startTime: 'string'
}
}
type: 'Suppression'
}
Property Values
Microsoft.AlertsManagement/actionRules
Name | Description | Value |
---|---|---|
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | action rule properties | ActionRuleProperties |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ActionGroup
Name | Description | Value |
---|---|---|
actionGroupId | Action group to trigger if action rule matches | string (required) |
type | Indicates type of action rule | 'ActionGroup' (required) |
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 to 'ActionGroup' for type ActionGroup. Set to 'Diagnostics' for type Diagnostics. Set to 'Suppression' for type Suppression. | 'ActionGroup' 'Diagnostics' 'Suppression' (required) |
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[] |
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 |
Diagnostics
Name | Description | Value |
---|---|---|
type | Indicates type of action rule | 'Diagnostics' (required) |
ManagedResourceTags
Name | Description | Value |
---|
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[] |
Suppression
Name | Description | Value |
---|---|---|
suppressionConfig | suppression configuration for the action rule | SuppressionConfig (required) |
type | Indicates type of action rule | 'Suppression' (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 |
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
Module | Description |
---|---|
Action Rules | AVM Resource Module for Action Rules |
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
Bicep File | 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 |
ARM template resource definition
The actionRules resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
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",
"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
},
"tags": {
"{customized property}": "string"
}
}
ActionRuleProperties objects
Set the type property to specify the type of object.
For ActionGroup, use:
{
"actionGroupId": "string",
"type": "ActionGroup"
}
For Diagnostics, use:
{
"type": "Diagnostics"
}
For Suppression, use:
{
"suppressionConfig": {
"recurrenceType": "string",
"schedule": {
"endDate": "string",
"endTime": "string",
"recurrenceValues": [ "int" ],
"startDate": "string",
"startTime": "string"
}
},
"type": "Suppression"
}
Property Values
Microsoft.AlertsManagement/actionRules
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2019-05-05-preview' |
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | action rule properties | ActionRuleProperties |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
type | The resource type | 'Microsoft.AlertsManagement/actionRules' |
ActionGroup
Name | Description | Value |
---|---|---|
actionGroupId | Action group to trigger if action rule matches | string (required) |
type | Indicates type of action rule | 'ActionGroup' (required) |
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 to 'ActionGroup' for type ActionGroup. Set to 'Diagnostics' for type Diagnostics. Set to 'Suppression' for type Suppression. | 'ActionGroup' 'Diagnostics' 'Suppression' (required) |
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[] |
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 |
Diagnostics
Name | Description | Value |
---|---|---|
type | Indicates type of action rule | 'Diagnostics' (required) |
ManagedResourceTags
Name | Description | Value |
---|
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[] |
Suppression
Name | Description | Value |
---|---|---|
suppressionConfig | suppression configuration for the action rule | SuppressionConfig (required) |
type | Indicates type of action rule | 'Suppression' (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 |
Usage Examples
Azure Quickstart Templates
The following Azure 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 |
Terraform (AzAPI provider) resource definition
The actionRules 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.AlertsManagement/actionRules resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.AlertsManagement/actionRules@2019-05-05-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
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:
{
actionGroupId = "string"
type = "ActionGroup"
}
For Diagnostics, use:
{
type = "Diagnostics"
}
For Suppression, use:
{
suppressionConfig = {
recurrenceType = "string"
schedule = {
endDate = "string"
endTime = "string"
recurrenceValues = [
int
]
startDate = "string"
startTime = "string"
}
}
type = "Suppression"
}
Property Values
Microsoft.AlertsManagement/actionRules
Name | Description | Value |
---|---|---|
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | action rule properties | ActionRuleProperties |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.AlertsManagement/actionRules@2019-05-05-preview" |
ActionGroup
Name | Description | Value |
---|---|---|
actionGroupId | Action group to trigger if action rule matches | string (required) |
type | Indicates type of action rule | 'ActionGroup' (required) |
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 to 'ActionGroup' for type ActionGroup. Set to 'Diagnostics' for type Diagnostics. Set to 'Suppression' for type Suppression. | 'ActionGroup' 'Diagnostics' 'Suppression' (required) |
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[] |
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 |
Diagnostics
Name | Description | Value |
---|---|---|
type | Indicates type of action rule | 'Diagnostics' (required) |
ManagedResourceTags
Name | Description | Value |
---|
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[] |
Suppression
Name | Description | Value |
---|---|---|
suppressionConfig | suppression configuration for the action rule | SuppressionConfig (required) |
type | Indicates type of action rule | 'Suppression' (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 |