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
subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

AlertProcessingRulesList

The request has succeeded.

Headers

x-ms-request-id: string

Other Status Codes

ErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

GetAlertProcessingRulesSubscriptionWide

Sample request

GET https://management.azure.com/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/actionRules?api-version=2021-08-08

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": [
    {
      "name": "DailySuppression",
      "type": "Microsoft.AlertsManagement/actionRules",
      "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression",
      "location": "Global",
      "properties": {
        "description": "Alert processing rule on resource group for daily suppression",
        "actions": [
          {
            "actionType": "RemoveAllActionGroups"
          }
        ],
        "conditions": [
          {
            "field": "Severity",
            "operator": "Equals",
            "values": [
              "Sev0",
              "Sev2"
            ]
          },
          {
            "field": "MonitorService",
            "operator": "Equals",
            "values": [
              "Platform",
              "Application Insights"
            ]
          },
          {
            "field": "TargetResourceType",
            "operator": "NotEquals",
            "values": [
              "Microsoft.Compute/VirtualMachines"
            ]
          }
        ],
        "enabled": true,
        "schedule": {
          "effectiveFrom": "2018-01-10T22:05:09",
          "effectiveUntil": "2018-12-10T22:05:09",
          "recurrences": [
            {
              "endTime": "14:00:00",
              "recurrenceType": "Daily",
              "startTime": "06:00:00"
            }
          ],
          "timeZone": "Pacific Standard Time"
        },
        "scopes": [
          "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg"
        ]
      },
      "systemData": {
        "createdAt": "2018-06-12T22:05:09Z",
        "createdBy": "abc@microsoft.com",
        "createdByType": "User",
        "lastModifiedAt": "2018-06-12T22:05:09Z",
        "lastModifiedBy": "xyz@microsoft.com",
        "lastModifiedByType": "User"
      },
      "tags": {}
    },
    {
      "name": "WeeklySuppression",
      "type": "Microsoft.AlertsManagement/actionRules",
      "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression",
      "location": "Global",
      "properties": {
        "description": "Alert processing rule on resource group for adding action group",
        "actions": [
          {
            "actionGroupIds": [
              "actiongGroup1"
            ],
            "actionType": "AddActionGroups"
          }
        ],
        "conditions": [
          {
            "field": "MonitorCondition",
            "operator": "Equals",
            "values": [
              "Fired"
            ]
          },
          {
            "field": "Description",
            "operator": "Contains",
            "values": [
              "Percentage CPU greater than 80%",
              "Metric alert on resource foo"
            ]
          }
        ],
        "enabled": true,
        "scopes": [
          "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.Compute/VirtualMachines/testResource"
        ]
      },
      "systemData": {
        "createdAt": "2018-06-12T22:05:09Z",
        "createdBy": "abc@microsoft.com",
        "createdByType": "User",
        "lastModifiedAt": "2018-06-12T22:05:09Z",
        "lastModifiedBy": "xyz@microsoft.com",
        "lastModifiedByType": "User"
      },
      "tags": {}
    }
  ]
}

Definitions

Name Description
ActionType

Action that should be applied.

AddActionGroups

Add action groups to alert processing rule.

AlertProcessingRule

Alert processing rule object containing target scopes, conditions and scheduling logic.

AlertProcessingRuleProperties

Alert processing rule properties defining scopes, conditions and scheduling logic for alert processing rule.

AlertProcessingRulesList

List of alert processing rules.

Condition

Condition to trigger an alert processing rule.

DailyRecurrence

Daily recurrence object.

DaysOfWeek

Days of week.

ErrorResponse

An error response from the service.

ErrorResponseBody

Details of error response.

Field

Field for a given condition.

MonthlyRecurrence

Monthly recurrence object.

Operator

Operator for a given condition.

RecurrenceType

Specifies when the recurrence should be applied.

RemoveAllActionGroups

Indicates if all action groups should be removed.

Schedule

Scheduling configuration for a given alert processing rule.

WeeklyRecurrence

Weekly recurrence object.

ActionType

Action that should be applied.

Value Description
AddActionGroups

AddActionGroups

RemoveAllActionGroups

RemoveAllActionGroups

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:

AddActionGroups

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

The geo-location where the resource lives

name

string

Azure resource name

properties

AlertProcessingRuleProperties

Alert processing rule properties.

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

Condition[]

Conditions on which alerts will be filtered.

description

string

Actions to be applied.Description of alert processing rule.

enabled

boolean

True

Indicates if the given alert processing rule is enabled or disabled.

schedule

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 (uri)

The link to the next page of items

value

AlertProcessingRule[]

The AlertProcessingRule items on this page

Condition

Condition to trigger an alert processing rule.

Name Type Description
field

Field

Field for a given condition.

operator

Operator

Operator for a given condition.

values

string[]

List of values to match for a given condition.

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.

Value Description
Sunday

Sunday

Monday

Monday

Tuesday

Tuesday

Wednesday

Wednesday

Thursday

Thursday

Friday

Friday

Saturday

Saturday

ErrorResponse

An error response from the service.

Name Type Description
error

ErrorResponseBody

Details of error response.

ErrorResponseBody

Details of error response.

Name Type Description
code

string

Error code, intended to be consumed programmatically.

details

ErrorResponseBody[]

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.

Value Description
Severity

Severity

MonitorService

MonitorService

MonitorCondition

MonitorCondition

SignalType

SignalType

TargetResourceType

TargetResourceType

TargetResource

TargetResource

TargetResourceGroup

TargetResourceGroup

AlertRuleId

AlertRuleId

AlertRuleName

AlertRuleName

Description

Description

AlertContext

AlertContext

MonthlyRecurrence

Monthly recurrence object.

Name Type Description
daysOfMonth

integer[] (int32)

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.

Value Description
Equals

Equals

NotEquals

NotEquals

Contains

Contains

DoesNotContain

DoesNotContain

RecurrenceType

Specifies when the recurrence should be applied.

Value Description
Daily

Daily

Weekly

Weekly

Monthly

Monthly

RemoveAllActionGroups

Indicates if all action groups should be removed.

Name Type Description
actionType string:

RemoveAllActionGroups

Action that should be applied.

Schedule

Scheduling configuration for a given alert processing rule.

Name Type Description
effectiveFrom

string

pattern: ^(?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))$

Scheduling effective from time. Date-Time in ISO-8601 format without timezone suffix.

effectiveUntil

string

pattern: ^(?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))$

Scheduling effective until time. Date-Time in ISO-8601 format without timezone suffix.

recurrences Recurrence[]:

List of recurrences.

timeZone

string

Scheduling time zone.

WeeklyRecurrence

Weekly recurrence object.

Name Type Description
daysOfWeek

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.