Skip to main content

alert_processing_rules

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

Overview

Namealert_processing_rules
TypeResource
Idazure.alerts_management.alert_processing_rules

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
actionstextfield from the properties object
alertProcessingRuleNametextfield from the properties object
conditionstextfield from the properties object
enabledtextfield from the properties object
locationtextResource location
resourceGroupNametextfield from the properties object
scheduletextfield from the properties object
scopestextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags

Methods

NameAccessible byRequired ParamsDescription
get_by_nameSELECTalertProcessingRuleName, resourceGroupName, subscriptionIdGet an alert processing rule by name.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList all alert processing rules in a resource group.
list_by_subscriptionSELECTsubscriptionIdList all alert processing rules in a subscription.
create_or_updateINSERTalertProcessingRuleName, resourceGroupName, subscriptionIdCreate or update an alert processing rule.
deleteDELETEalertProcessingRuleName, resourceGroupName, subscriptionIdDelete an alert processing rule.
updateUPDATEalertProcessingRuleName, resourceGroupName, subscriptionIdEnable, disable, or update tags for an alert processing rule.

SELECT examples

List all alert processing rules in a subscription.

SELECT
description,
actions,
alertProcessingRuleName,
conditions,
enabled,
location,
resourceGroupName,
schedule,
scopes,
subscriptionId,
system_data,
tags
FROM azure.alerts_management.vw_alert_processing_rules
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new alert_processing_rules resource.

/*+ create */
INSERT INTO azure.alerts_management.alert_processing_rules (
alertProcessingRuleName,
resourceGroupName,
subscriptionId,
location,
tags,
properties,
systemData
)
SELECT
'{{ alertProcessingRuleName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ systemData }}'
;

UPDATE example

Updates a alert_processing_rules resource.

/*+ update */
UPDATE azure.alerts_management.alert_processing_rules
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
alertProcessingRuleName = '{{ alertProcessingRuleName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified alert_processing_rules resource.

/*+ delete */
DELETE FROM azure.alerts_management.alert_processing_rules
WHERE alertProcessingRuleName = '{{ alertProcessingRuleName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';