Skip to main content

alert_processing_rules

Creates, updates, deletes, gets or lists an alert_processing_rules resource.

Overview

Namealert_processing_rules
TypeResource
Idazure.alerts_management.alert_processing_rules

Fields

The following fields are returned by SELECT queries:

OK. Returns the specific alert processing rule.

NameDatatypeDescription
locationstringResource location
propertiesobjectAlert processing rule properties.
systemDataobjectAlert processing rule system data.
tagsobjectResource tags

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_nameselectsubscriptionId, resourceGroupName, alertProcessingRuleNameGet an alert processing rule by name.
list_by_resource_groupselectsubscriptionId, resourceGroupNameList all alert processing rules in a resource group.
list_by_subscriptionselectsubscriptionIdList all alert processing rules in a subscription.
create_or_updateinsertsubscriptionId, resourceGroupName, alertProcessingRuleNameCreate or update an alert processing rule.
updateupdatesubscriptionId, resourceGroupName, alertProcessingRuleNameEnable, disable, or update tags for an alert processing rule.
deletedeletesubscriptionId, resourceGroupName, alertProcessingRuleNameDelete an alert processing rule.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
alertProcessingRuleNamestringThe name of the alert processing rule that needs to be deleted.
resourceGroupNamestringResource group name where the resource is created.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

Get an alert processing rule by name.

SELECT
location,
properties,
systemData,
tags
FROM azure.alerts_management.alert_processing_rules
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND alertProcessingRuleName = '{{ alertProcessingRuleName }}' -- required
;

INSERT examples

Create or update an alert processing rule.

INSERT INTO azure.alerts_management.alert_processing_rules (
data__location,
data__tags,
data__properties,
subscriptionId,
resourceGroupName,
alertProcessingRuleName
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ alertProcessingRuleName }}'
RETURNING
location,
properties,
systemData,
tags
;

UPDATE examples

Enable, disable, or update tags for an alert processing rule.

UPDATE azure.alerts_management.alert_processing_rules
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND alertProcessingRuleName = '{{ alertProcessingRuleName }}' --required
RETURNING
location,
properties,
systemData,
tags;

DELETE examples

Delete an alert processing rule.

DELETE FROM azure.alerts_management.alert_processing_rules
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND alertProcessingRuleName = '{{ alertProcessingRuleName }}' --required
;