Skip to main content

alert_rules

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

Overview

Namealert_rules
TypeResource
Idazure.sentinel.alert_rules

Fields

NameDatatypeDescription
etagstringEtag of the azure resource
kindstringThe kind of the alert rule

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, ruleId, subscriptionId, workspaceNameGets the alert rule.
listSELECTresourceGroupName, subscriptionId, workspaceNameGets all alert rules.
create_or_updateINSERTresourceGroupName, ruleId, subscriptionId, workspaceName, data__kindCreates or updates the alert rule.
deleteDELETEresourceGroupName, ruleId, subscriptionId, workspaceNameDelete the alert rule.

SELECT examples

Gets all alert rules.

SELECT
etag,
kind
FROM azure.sentinel.alert_rules
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sentinel.alert_rules (
resourceGroupName,
ruleId,
subscriptionId,
workspaceName,
data__kind,
etag,
kind
)
SELECT
'{{ resourceGroupName }}',
'{{ ruleId }}',
'{{ subscriptionId }}',
'{{ workspaceName }}',
'{{ data__kind }}',
'{{ etag }}',
'{{ kind }}'
;

DELETE example

Deletes the specified alert_rules resource.

/*+ delete */
DELETE FROM azure.sentinel.alert_rules
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND ruleId = '{{ ruleId }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';