Skip to main content

insights

Creates, updates, deletes or gets an insight resource or lists insights in a region

Overview

Nameinsights
TypeResource
DescriptionThe AWS::SecurityHub::Insight resource represents the AWS Security Hub Insight in your account. An AWS Security Hub insight is a collection of related findings.
Idawscc.securityhub.insights

Fields

NameDatatypeDescription
insight_arnstringThe ARN of a Security Hub insight
namestringThe name of a Security Hub insight
filtersobjectOne or more attributes used to filter the findings included in the insight
group_by_attributestringThe grouping attribute for the insight's findings
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourceinsightsINSERTFilters, Name, GroupByAttribute, region
delete_resourceinsightsDELETEIdentifier, region
update_resourceinsightsUPDATEIdentifier, PatchDocument, region
list_resourcesinsights_list_onlySELECTregion
get_resourceinsightsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual insight.

SELECT
region,
insight_arn,
name,
filters,
group_by_attribute
FROM awscc.securityhub.insights
WHERE
region = 'us-east-1' AND
Identifier = '{{ insight_arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.securityhub.insights (
Name,
Filters,
GroupByAttribute,
region
)
SELECT
'{{ name }}',
'{{ filters }}',
'{{ group_by_attribute }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a insight resource, using stack-deploy.

/*+ update */
UPDATE awscc.securityhub.insights
SET PatchDocument = string('{{ {
"Name": name,
"Filters": filters,
"GroupByAttribute": group_by_attribute
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ insight_arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.securityhub.insights
WHERE
Identifier = '{{ insight_arn }}' AND
region = 'us-east-1';

Permissions

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

securityhub:CreateInsight