Skip to main content

filters

Creates, updates, deletes or gets a filter resource or lists filters in a region

Overview

Namefilters
TypeResource
DescriptionResource Type definition for AWS::GuardDuty::Filter
Idaws.guardduty.filters

Fields

NameDatatypeDescription
actionstring
descriptionstring
detector_idstring
finding_criteriaobject
rankinteger
namestring
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTFindingCriteria, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all filters in a region.

SELECT
region,
action,
description,
detector_id,
finding_criteria,
rank,
name,
tags
FROM aws.guardduty.filters
WHERE region = 'us-east-1';

Gets all properties from an individual filter.

SELECT
region,
action,
description,
detector_id,
finding_criteria,
rank,
name,
tags
FROM aws.guardduty.filters
WHERE region = 'us-east-1' AND data__Identifier = '<DetectorId>|<Name>';

INSERT example

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

/*+ create */
INSERT INTO aws.guardduty.filters (
FindingCriteria,
region
)
SELECT
'{{ FindingCriteria }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.guardduty.filters
WHERE data__Identifier = '<DetectorId|Name>'
AND region = 'us-east-1';

Permissions

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

Create

guardduty:CreateFilter,
guardduty:GetFilter,
guardduty:TagResource

Read

guardduty:GetFilter

Delete

guardduty:ListDetectors,
guardduty:ListFilters,
guardduty:GetFilter,
guardduty:DeleteFilter

Update

guardduty:UpdateFilter,
guardduty:GetFilter,
guardduty:ListFilters

List

guardduty:ListFilters