Skip to main content

automation_rule_v2s

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

Overview

Nameautomation_rule_v2s
TypeResource
Idaws.securityhub.automation_rule_v2s

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
actionsarrayA list of actions performed when the rule criteria is met.
created_atstring (date-time)The timestamp when the V2 automation rule was created.
criteriaobjectThe filtering type and configuration of the V2 automation rule.
descriptionstringA description of the automation rule. (pattern: <code>.\S.</code>)
rule_arnstringThe ARN of the V2 automation rule. (pattern: <code>.\S.</code>)
rule_idstringThe ID of the V2 automation rule. (pattern: <code>.\S.</code>)
rule_namestringThe name of the V2 automation rule. (pattern: <code>.\S.</code>)
rule_ordernumber (float)The value for the rule priority.
rule_statusstringThe status of the V2 automation automation rule. (ENABLED, DISABLED)
updated_atstring (date-time)The timestamp when the V2 automation rule was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_automation_rule_v2selectidentifier, regionReturns an automation rule for the V2 service.
create_automation_rule_v2insertregion, RuleName, RuleOrderCreates a V2 automation rule.
update_automation_rule_v2updateidentifier, regionUpdates a V2 automation rule.
delete_automation_rule_v2deleteidentifier, regionDeletes a V2 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
identifierstringThe ARN of the V2 automation rule.
regionstringAWS region (default: us-east-1)

SELECT examples

Returns an automation rule for the V2 service.

SELECT
actions,
created_at,
criteria,
description,
rule_arn,
rule_id,
rule_name,
rule_order,
rule_status,
updated_at
FROM aws.securityhub.automation_rule_v2s
WHERE identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a V2 automation rule.

INSERT INTO aws.securityhub.automation_rule_v2s (
RuleName,
RuleStatus,
Description,
RuleOrder,
Criteria,
Actions,
Tags,
ClientToken,
region
)
SELECT
'{{ RuleName }}' /* required */,
'{{ RuleStatus }}',
'{{ Description }}',
{{ RuleOrder }} /* required */,
'{{ Criteria }}',
'{{ Actions }}',
'{{ Tags }}',
'{{ ClientToken }}',
'{{ region }}'
RETURNING
rule_arn,
rule_id
;

UPDATE examples

Updates a V2 automation rule.

UPDATE aws.securityhub.automation_rule_v2s
SET
RuleStatus = '{{ RuleStatus }}',
RuleOrder = {{ RuleOrder }},
Description = '{{ Description }}',
RuleName = '{{ RuleName }}',
Criteria = '{{ Criteria }}',
Actions = '{{ Actions }}'
WHERE
identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes a V2 automation rule.

DELETE FROM aws.securityhub.automation_rule_v2s
WHERE identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;