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
locationstringThe geo-location where the resource lives
propertiesobjectSecurity automation data
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, automationNameapi-versionRetrieves information about the model of a security automation.
list_by_resource_groupselectsubscriptionId, resourceGroupNameapi-versionLists 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.
listselectsubscriptionIdapi-versionLists 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_updateinsertsubscriptionId, resourceGroupName, automationNameapi-versionCreates 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.
updateupdatesubscriptionId, resourceGroupName, automationNameapi-versionUpdates a security automation
deletedeletesubscriptionId, resourceGroupName, automationNameapi-versionDeletes a security automation.
validateexecsubscriptionId, resourceGroupName, automationNameapi-versionValidates 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
automationNamestringThe security automation name.
resourceGroupNamestringThe name of the resource group within the user's subscription. The name is case insensitive.
subscriptionIdstringAzure subscription ID
api-versionstringAPI version for the operation

SELECT examples

Retrieves information about the model of a security automation.

SELECT
location,
properties,
tags
FROM azure.security.automations
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND automationName = '{{ automationName }}' -- required
AND api-version = '{{ api-version }}'
;

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 (
data__properties,
data__tags,
data__location,
subscriptionId,
resourceGroupName,
automationName,
api-version
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ automationName }}',
'{{ api-version }}'
RETURNING
location,
properties,
tags
;

UPDATE examples

Updates a security automation

UPDATE azure.security.automations
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND automationName = '{{ automationName }}' --required
AND api-version = '{{ api-version}}'
RETURNING
location,
properties,
tags;

DELETE examples

Deletes a security automation.

DELETE FROM azure.security.automations
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND automationName = '{{ automationName }}' --required
AND api-version = '{{ api-version }}'
;

Lifecycle Methods

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

EXEC azure.security.automations.validate 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@automationName='{{ automationName }}' --required,
@api-version='{{ api-version }}'
@@json=
'{
"properties": "{{ properties }}",
"tags": "{{ tags }}",
"location": "{{ location }}"
}'
;