Alert Processing Rules - List By Subscription
List all alert processing rules in a subscription.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules?api-version=2021-08-08
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
subscription
|
path | True |
string |
The ID of the target subscription. |
api-version
|
query | True |
Client API version. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. Return the list of alert processing rules. Headers x-ms-request-id: string |
|
Other Status Codes |
Error response describing why the operation failed. |
Examples
GetAlertProcessingRulesSubscriptionWide
Sample request
Sample response
{
"nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/actionRules?api-version=2021-08-08&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1",
"value": [
{
"systemData": {
"createdBy": "abc@microsoft.com",
"createdByType": "User",
"createdAt": "2018-06-12T22:05:09Z",
"lastModifiedBy": "xyz@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2018-06-12T22:05:09Z"
},
"properties": {
"scopes": [
"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg"
],
"conditions": [
{
"field": "Severity",
"operator": "Equals",
"values": [
"Sev0",
"Sev2"
]
},
{
"field": "MonitorService",
"operator": "Equals",
"values": [
"Platform",
"Application Insights"
]
},
{
"field": "TargetResourceType",
"operator": "NotEquals",
"values": [
"Microsoft.Compute/VirtualMachines"
]
}
],
"schedule": {
"effectiveFrom": "2018-01-10T22:05:09",
"effectiveUntil": "2018-12-10T22:05:09",
"timeZone": "Pacific Standard Time",
"recurrences": [
{
"recurrenceType": "Daily",
"startTime": "06:00:00",
"endTime": "14:00:00"
}
]
},
"actions": [
{
"actionType": "RemoveAllActionGroups"
}
],
"description": "Alert processing rule on resource group for daily suppression",
"enabled": true
},
"id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression",
"type": "Microsoft.AlertsManagement/actionRules",
"name": "DailySuppression",
"location": "Global",
"tags": {}
},
{
"systemData": {
"createdBy": "abc@microsoft.com",
"createdByType": "User",
"createdAt": "2018-06-12T22:05:09Z",
"lastModifiedBy": "xyz@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2018-06-12T22:05:09Z"
},
"properties": {
"scopes": [
"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.Compute/VirtualMachines/testResource"
],
"conditions": [
{
"field": "MonitorCondition",
"operator": "Equals",
"values": [
"Fired"
]
},
{
"field": "Description",
"operator": "Contains",
"values": [
"Percentage CPU greater than 80%",
"Metric alert on resource foo"
]
}
],
"description": "Alert processing rule on resource group for adding action group",
"enabled": true,
"actions": [
{
"actionType": "AddActionGroups",
"actionGroupIds": [
"actiongGroup1"
]
}
]
},
"id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression",
"type": "Microsoft.AlertsManagement/actionRules",
"name": "WeeklySuppression",
"location": "Global",
"tags": {}
}
]
}
Definitions
Name | Description |
---|---|
Add |
Add action groups to alert processing rule. |
Alert |
Alert processing rule object containing target scopes, conditions and scheduling logic. |
Alert |
Alert processing rule properties defining scopes, conditions and scheduling logic for alert processing rule. |
Alert |
List of alert processing rules. |
api-version |
Client API version. |
Condition |
Condition to trigger an alert processing rule. |
created |
The type of identity that created the resource. |
Daily |
Daily recurrence object. |
Days |
Days of week. |
error |
An error response from the service. |
error |
Details of error response. |
Field |
Field for a given condition. |
Monthly |
Monthly recurrence object. |
Operator |
Operator for a given condition. |
Remove |
Indicates if all action groups should be removed. |
Schedule |
Scheduling configuration for a given alert processing rule. |
system |
Metadata pertaining to creation and last modification of the resource. |
Weekly |
Weekly recurrence object. |
AddActionGroups
Add action groups to alert processing rule.
Name | Type | Description |
---|---|---|
actionGroupIds |
string[] |
List of action group Ids to add to alert processing rule. |
actionType | string: |
Action that should be applied. |
AlertProcessingRule
Alert processing rule object containing target scopes, conditions and scheduling logic.
Name | Type | Description |
---|---|---|
id |
string |
Azure resource Id |
location |
string |
Resource location |
name |
string |
Azure resource name |
properties |
Alert processing rule properties. |
|
systemData |
Alert processing rule system data. |
|
tags |
object |
Resource tags |
type |
string |
Azure resource type |
AlertProcessingRuleProperties
Alert processing rule properties defining scopes, conditions and scheduling logic for alert processing rule.
Name | Type | Default value | Description |
---|---|---|---|
actions | Action[]: |
Actions to be applied. |
|
conditions |
Conditions on which alerts will be filtered. |
||
description |
string |
Description of alert processing rule. |
|
enabled |
boolean |
True |
Indicates if the given alert processing rule is enabled or disabled. |
schedule |
Scheduling for alert processing rule. |
||
scopes |
string[] |
Scopes on which alert processing rule will apply. |
AlertProcessingRulesList
List of alert processing rules.
Name | Type | Description |
---|---|---|
nextLink |
string |
URL to fetch the next set of alert processing rules. |
value |
List of alert processing rules. |
api-version
Client API version.
Name | Type | Description |
---|---|---|
2021-08-08 |
string |
Condition
Condition to trigger an alert processing rule.
Name | Type | Description |
---|---|---|
field |
Field for a given condition. |
|
operator |
Operator for a given condition. |
|
values |
string[] |
List of values to match for a given condition. |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
DailyRecurrence
Daily recurrence object.
Name | Type | Description |
---|---|---|
endTime |
string |
End time for recurrence. |
recurrenceType |
string:
Daily |
Specifies when the recurrence should be applied. |
startTime |
string |
Start time for recurrence. |
DaysOfWeek
Days of week.
Name | Type | Description |
---|---|---|
Friday |
string |
|
Monday |
string |
|
Saturday |
string |
|
Sunday |
string |
|
Thursday |
string |
|
Tuesday |
string |
|
Wednesday |
string |
errorResponse
An error response from the service.
Name | Type | Description |
---|---|---|
error |
Details of error response. |
errorResponseBody
Details of error response.
Name | Type | Description |
---|---|---|
code |
string |
Error code, intended to be consumed programmatically. |
details |
A list of additional details about the error. |
|
message |
string |
Description of the error, intended for display in user interface. |
target |
string |
Target of the particular error, for example name of the property. |
Field
Field for a given condition.
Name | Type | Description |
---|---|---|
AlertContext |
string |
|
AlertRuleId |
string |
|
AlertRuleName |
string |
|
Description |
string |
|
MonitorCondition |
string |
|
MonitorService |
string |
|
Severity |
string |
|
SignalType |
string |
|
TargetResource |
string |
|
TargetResourceGroup |
string |
|
TargetResourceType |
string |
MonthlyRecurrence
Monthly recurrence object.
Name | Type | Description |
---|---|---|
daysOfMonth |
integer[] |
Specifies the values for monthly recurrence pattern. |
endTime |
string |
End time for recurrence. |
recurrenceType |
string:
Monthly |
Specifies when the recurrence should be applied. |
startTime |
string |
Start time for recurrence. |
Operator
Operator for a given condition.
Name | Type | Description |
---|---|---|
Contains |
string |
|
DoesNotContain |
string |
|
Equals |
string |
|
NotEquals |
string |
RemoveAllActionGroups
Indicates if all action groups should be removed.
Name | Type | Description |
---|---|---|
actionType | string: |
Action that should be applied. |
Schedule
Scheduling configuration for a given alert processing rule.
Name | Type | Description |
---|---|---|
effectiveFrom |
string |
Scheduling effective from time. Date-Time in ISO-8601 format without timezone suffix. |
effectiveUntil |
string |
Scheduling effective until time. Date-Time in ISO-8601 format without timezone suffix. |
recurrences | Recurrence[]: |
List of recurrences. |
timeZone |
string |
Scheduling time zone. |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |
WeeklyRecurrence
Weekly recurrence object.
Name | Type | Description |
---|---|---|
daysOfWeek |
Specifies the values for weekly recurrence pattern. |
|
endTime |
string |
End time for recurrence. |
recurrenceType |
string:
Weekly |
Specifies when the recurrence should be applied. |
startTime |
string |
Start time for recurrence. |