alert_processing_rules
Creates, updates, deletes, gets or lists a alert_processing_rules
resource.
Overview
Name | alert_processing_rules |
Type | Resource |
Id | azure.alerts_management.alert_processing_rules |
Fields
- vw_alert_processing_rules
- alert_processing_rules
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
actions | text | field from the properties object |
alertProcessingRuleName | text | field from the properties object |
conditions | text | field from the properties object |
enabled | text | field from the properties object |
location | text | Resource location |
resourceGroupName | text | field from the properties object |
schedule | text | field from the properties object |
scopes | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
tags | text | Resource tags |
Name | Datatype | Description |
---|---|---|
location | string | Resource location |
properties | object | Alert processing rule properties defining scopes, conditions and scheduling logic for alert processing rule. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get_by_name | SELECT | alertProcessingRuleName, resourceGroupName, subscriptionId | Get an alert processing rule by name. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | List all alert processing rules in a resource group. |
list_by_subscription | SELECT | subscriptionId | List all alert processing rules in a subscription. |
create_or_update | INSERT | alertProcessingRuleName, resourceGroupName, subscriptionId | Create or update an alert processing rule. |
delete | DELETE | alertProcessingRuleName, resourceGroupName, subscriptionId | Delete an alert processing rule. |
update | UPDATE | alertProcessingRuleName, resourceGroupName, subscriptionId | Enable, disable, or update tags for an alert processing rule. |
SELECT
examples
List all alert processing rules in a subscription.
- vw_alert_processing_rules
- alert_processing_rules
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 }}';
SELECT
location,
properties,
systemData,
tags
FROM azure.alerts_management.alert_processing_rules
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new alert_processing_rules
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.alerts_management.alert_processing_rules (
alertProcessingRuleName,
resourceGroupName,
subscriptionId,
location,
tags,
properties,
systemData
)
SELECT
'{{ alertProcessingRuleName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ systemData }}'
;
- name: your_resource_model_name
props:
- name: location
value: string
- name: tags
value: object
- name: properties
value:
- name: scopes
value: []
- name: conditions
value: []
- name: schedule
value:
- name: effectiveFrom
value: string
- name: effectiveUntil
value: string
- name: timeZone
value: string
- name: recurrences
value:
- - name: recurrenceType
value: string
- name: startTime
value: string
- name: endTime
value: string
- name: actions
value:
- - name: actionType
value: string
- name: description
value: string
- name: enabled
value: boolean
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
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 }}';