Skip to main content

automation_rules

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

Overview

Nameautomation_rules
TypeResource
Idazure.security_insight.automation_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
actionsarrayThe actions to execute when the automation rule is triggered. Required.
createdByobjectInformation on the client (user or application) that made some action.
createdTimeUtcstring (date-time)The time the automation rule was created.
displayNamestringThe display name of the automation rule. Required.
etagstringEtag of the azure resource.
lastModifiedByobjectInformation on the client (user or application) that made some action.
lastModifiedTimeUtcstring (date-time)The last time the automation rule was updated.
orderintegerThe order of execution of the automation rule. Required.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
triggeringLogicobjectDescribes automation rule triggering logic. Required.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, workspace_name, automation_rule_id, subscription_idGets the automation rule.
listselectresource_group_name, workspace_name, subscription_idGets all automation rules.
create_or_updateinsertresource_group_name, workspace_name, automation_rule_id, subscription_id, propertiesCreates or updates the automation rule.
create_or_updatereplaceresource_group_name, workspace_name, automation_rule_id, subscription_id, propertiesCreates or updates the automation rule.
deletedeleteresource_group_name, workspace_name, automation_rule_id, subscription_idDelete the automation 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
automation_rule_idstringAutomation rule ID. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
workspace_namestringThe name of the monitor workspace. Required.

SELECT examples

Gets the automation rule.

SELECT
id,
name,
actions,
createdBy,
createdTimeUtc,
displayName,
etag,
lastModifiedBy,
lastModifiedTimeUtc,
order,
systemData,
triggeringLogic,
type
FROM azure.security_insight.automation_rules
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND automation_rule_id = '{{ automation_rule_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates the automation rule.

INSERT INTO azure.security_insight.automation_rules (
properties,
etag,
resource_group_name,
workspace_name,
automation_rule_id,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ etag }}',
'{{ resource_group_name }}',
'{{ workspace_name }}',
'{{ automation_rule_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type
;

REPLACE examples

Creates or updates the automation rule.

REPLACE azure.security_insight.automation_rules
SET
properties = '{{ properties }}',
etag = '{{ etag }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND automation_rule_id = '{{ automation_rule_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
etag,
properties,
systemData,
type;

DELETE examples

Delete the automation rule.

DELETE FROM azure.security_insight.automation_rules
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND automation_rule_id = '{{ automation_rule_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;