Skip to main content

automations

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

Overview

Nameautomations
TypeResource
Idazure.security.automations

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.
actionsarrayA collection of the actions which are triggered if all the configured rules evaluations, within at least one rule set, are true.
descriptionstringThe security automation description.
etagstringEntity tag is used for comparing two or more entities from the same requested resource.
isEnabledbooleanIndicates whether the security automation is enabled.
kindstringKind of the resource.
locationstringThe geo-location where the resource lives.
scopesarrayA collection of scopes on which the security automations logic is applied. Supported scopes are the subscription itself or a resource group under that subscription. The automation will only apply on defined scopes.
sourcesarrayA collection of the source event types which evaluate the security automation set of rules.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
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, automation_name, subscription_idRetrieves information about the model of a security automation.
list_by_resource_groupselectresource_group_name, subscription_idLists all the security automations in the specified resource group. Use the 'nextLink' property in the response to get the next page of security automations for the specified resource group.
listselectsubscription_idLists all the security automations in the specified subscription. Use the 'nextLink' property in the response to get the next page of security automations for the specified subscription.
create_or_updateinsertresource_group_name, automation_name, subscription_idCreates or updates a security automation. If a security automation is already created and a subsequent request is issued for the same automation id, then it will be updated.
updateupdateresource_group_name, automation_name, subscription_idUpdates a security automation.
create_or_updatereplaceresource_group_name, automation_name, subscription_idCreates or updates a security automation. If a security automation is already created and a subsequent request is issued for the same automation id, then it will be updated.
deletedeleteresource_group_name, automation_name, subscription_idDeletes a security automation.
validateexecresource_group_name, automation_name, subscription_idValidates the security automation model before create or update. Any validation errors are returned to the client.

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_namestringThe security automation name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Retrieves information about the model of a security automation.

SELECT
id,
name,
actions,
description,
etag,
isEnabled,
kind,
location,
scopes,
sources,
systemData,
tags,
type
FROM azure.security.automations
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND automation_name = '{{ automation_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a security automation. If a security automation is already created and a subsequent request is issued for the same automation id, then it will be updated.

INSERT INTO azure.security.automations (
properties,
tags,
location,
kind,
etag,
resource_group_name,
automation_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ kind }}',
'{{ etag }}',
'{{ resource_group_name }}',
'{{ automation_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
kind,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates a security automation.

UPDATE azure.security.automations
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_name = '{{ automation_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
kind,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Creates or updates a security automation. If a security automation is already created and a subsequent request is issued for the same automation id, then it will be updated.

REPLACE azure.security.automations
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
location = '{{ location }}',
kind = '{{ kind }}',
etag = '{{ etag }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_name = '{{ automation_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
kind,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a security automation.

DELETE FROM azure.security.automations
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND automation_name = '{{ automation_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Validates the security automation model before create or update. Any validation errors are returned to the client.

EXEC azure.security.automations.validate 
@resource_group_name='{{ resource_group_name }}' --required,
@automation_name='{{ automation_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}",
"tags": "{{ tags }}",
"location": "{{ location }}",
"kind": "{{ kind }}",
"etag": "{{ etag }}"
}'
;