AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::GuardDuty::Filter

CfnFilter

The `AWS::GuardDuty::Filter` resource specifies a new filter defined by the provided `findingCriteria` .

Import

import { CfnFilter } from 'aws-cdk-lib/aws-guardduty';

Or use the module namespace:

import * as guardduty from 'aws-cdk-lib/aws-guardduty';
// guardduty.CfnFilter

Properties

Configuration passed to the constructor as CfnFilterProps.

detectorIdRequired
string

The detector ID associated with the GuardDuty account for which you want to create a filter. To find the `detectorId` in the current Region, see the Settings page in the GuardDuty console, or run the [ListDetectors](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html) API.

findingCriteriaRequired
IResolvable | FindingCriteriaProperty

Represents the criteria to be used in the filter for querying findings.

nameRequired
string

The name of the filter. Valid characters include period (.), underscore (_), dash (-), and alphanumeric characters. A whitespace is considered to be an invalid character.

actionOptional
string

Specifies the action that is to be applied to the findings that match the filter.

descriptionOptional
string

The description of the filter. Valid characters include alphanumeric characters, and special characters such as hyphen, period, colon, underscore, parentheses ( `{ }` , `[ ]` , and `( )` ), forward slash, horizontal tab, vertical tab, newline, form feed, return, and whitespace.

rankOptional
number

Specifies the position of the filter in the list of current filters. Also specifies the order in which this filter is applied to the findings. The minimum value for this property is 1 and the maximum is 100. By default, filters may not be created in the same order as they are ranked. To ensure that the filters are created in the expected order, you can use an optional attribute, [DependsOn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html) , with the following syntax: `"DependsOn":[ "ObjectName" ]` .

tagsOptional
CfnTag[]

The tags to be added to a new filter resource. Each tag consists of a key and an optional value, both of which you define. For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter