Skip to main content

automation_rule_v2s

Creates, updates, deletes or gets an automation_rule_v2 resource or lists automation_rule_v2s in a region

Overview

Nameautomation_rule_v2s
TypeResource
DescriptionResource schema for AWS::SecurityHub::AutomationRuleV2
Idawscc.securityhub.automation_rule_v2s

Fields

NameDatatypeDescription
rule_namestringThe name of the automation rule
rule_statusstringThe status of the automation rule
descriptionstringA description of the automation rule
rule_ordernumberThe value for the rule priority
criteriaobjectDefines the parameters and conditions used to evaluate and filter security findings
actionsarrayA list of actions to be performed when the rule criteria is met
tagsobjectA key-value pair to associate with the Security Hub V2 resource. You can specify a key that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
rule_arnstringThe ARN of the automation rule
rule_idstringThe ID of the automation rule
created_atstringThe date and time, in UTC and ISO 8601 format.
regionstringAWS region.

For more information, see AWS::SecurityHub::AutomationRuleV2.

Methods

NameAccessible byRequired Params
create_resourceINSERTRuleName, Description, RuleOrder, Criteria, Actions, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual automation_rule_v2.

SELECT
region,
rule_name,
rule_status,
description,
rule_order,
criteria,
actions,
tags,
rule_arn,
rule_id,
created_at,
updated_at
FROM awscc.securityhub.automation_rule_v2s
WHERE region = 'us-east-1' AND data__Identifier = '<RuleArn>';

INSERT example

Use the following StackQL query and manifest file to create a new automation_rule_v2 resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.securityhub.automation_rule_v2s (
RuleName,
Description,
RuleOrder,
Criteria,
Actions,
region
)
SELECT
'{{ RuleName }}',
'{{ Description }}',
'{{ RuleOrder }}',
'{{ Criteria }}',
'{{ Actions }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.securityhub.automation_rule_v2s
WHERE data__Identifier = '<RuleArn>'
AND region = 'us-east-1';

Permissions

To operate on the automation_rule_v2s resource, the following permissions are required:

Create

securityhub:CreateAutomationRuleV2,
securityhub:GetAutomationRuleV2,
securityhub:TagResource,
securityhub:ListTagsForResource

Read

securityhub:GetAutomationRuleV2,
securityhub:ListTagsForResource

Update

securityhub:UpdateAutomationRuleV2,
securityhub:GetAutomationRuleV2,
securityhub:TagResource,
securityhub:UntagResource,
securityhub:ListTagsForResource

Delete

securityhub:GetAutomationRuleV2,
securityhub:DeleteAutomationRuleV2

List

securityhub:ListAutomationRulesV2,
securityhub:ListTagsForResource