java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:57.162Z") @Stability(Stable) public class CfnFilter extends CfnResource implements IInspectable
A CloudFormation AWS::GuardDuty::Filter.

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

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.guardduty.*;
 Object criterion;
 CfnFilter cfnFilter = CfnFilter.Builder.create(this, "MyCfnFilter")
         .action("action")
         .description("description")
         .detectorId("detectorId")
         .findingCriteria(FindingCriteriaProperty.builder()
                 .criterion(criterion)
                 .itemType(ConditionProperty.builder()
                         .eq(List.of("eq"))
                         .equalTo(List.of("equalTo"))
                         .greaterThan(123)
                         .greaterThanOrEqual(123)
                         .gt(123)
                         .gte(123)
                         .lessThan(123)
                         .lessThanOrEqual(123)
                         .lt(123)
                         .lte(123)
                         .neq(List.of("neq"))
                         .notEquals(List.of("notEquals"))
                         .build())
                 .build())
         .name("name")
         .rank(123)
         // the properties below are optional
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnFilter

      protected CfnFilter(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnFilter

      protected CfnFilter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnFilter

      @Stability(Stable) public CfnFilter(@NotNull Construct scope, @NotNull String id, @NotNull CfnFilterProps props)
      Create a new AWS::GuardDuty::Filter.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      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 .

    • getAction

      @Stability(Stable) @NotNull public String getAction()
      Specifies the action that is to be applied to the findings that match the filter.
    • setAction

      @Stability(Stable) public void setAction(@NotNull String value)
      Specifies the action that is to be applied to the findings that match the filter.
    • getDescription

      @Stability(Stable) @NotNull public String getDescription()
      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.

    • setDescription

      @Stability(Stable) public void setDescription(@NotNull String value)
      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.

    • getDetectorId

      @Stability(Stable) @NotNull public String getDetectorId()
      The ID of the detector belonging to the GuardDuty account that you want to create a filter for.
    • setDetectorId

      @Stability(Stable) public void setDetectorId(@NotNull String value)
      The ID of the detector belonging to the GuardDuty account that you want to create a filter for.
    • getFindingCriteria

      @Stability(Stable) @NotNull public Object getFindingCriteria()
      Represents the criteria to be used in the filter for querying findings.
    • setFindingCriteria

      @Stability(Stable) public void setFindingCriteria(@NotNull IResolvable value)
      Represents the criteria to be used in the filter for querying findings.
    • setFindingCriteria

      @Stability(Stable) public void setFindingCriteria(@NotNull CfnFilter.FindingCriteriaProperty value)
      Represents the criteria to be used in the filter for querying findings.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the filter.

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

    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the filter.

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

    • getRank

      @Stability(Stable) @NotNull public Number getRank()
      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 , with the following syntax: "DependsOn":[ "ObjectName" ] .

    • setRank

      @Stability(Stable) public void setRank(@NotNull Number value)
      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 , with the following syntax: "DependsOn":[ "ObjectName" ] .