filters
Creates, updates, deletes or gets a filter
resource or lists filters
in a region
Overview
Name | filters |
Type | Resource |
Description | Resource Type definition for AWS::GuardDuty::Filter |
Id | aws.guardduty.filters |
Fields
Name | Datatype | Description |
---|---|---|
action | string | |
description | string | |
detector_id | string | |
finding_criteria | object | |
rank | integer | |
name | string | |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | FindingCriteria, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.guardduty.filters (
FindingCriteria,
region
)
SELECT
'{{ FindingCriteria }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.guardduty.filters (
Action,
Description,
DetectorId,
FindingCriteria,
Rank,
Name,
Tags,
region
)
SELECT
'{{ Action }}',
'{{ Description }}',
'{{ DetectorId }}',
'{{ FindingCriteria }}',
'{{ Rank }}',
'{{ Name }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: filter
props:
- name: Action
value: '{{ Action }}'
- name: Description
value: '{{ Description }}'
- name: DetectorId
value: '{{ DetectorId }}'
- name: FindingCriteria
value:
Criterion: {}
- name: Rank
value: '{{ Rank }}'
- name: Name
value: '{{ Name }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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