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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:44.316Z") @Stability(Stable) public class CfnFilter extends CfnResource implements IInspectable, ITaggable
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")
         .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")
         // the properties below are optional
         .action("action")
         .description("description")
         .rank(123)
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnFilterProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). 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()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getDetectorId

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

      @Stability(Stable) public void setDetectorId(@NotNull String value)
      The detector ID associated with the GuardDuty account for which you want to create a filter.
    • 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.
    • setName

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

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

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

      @Stability(Stable) @Nullable public String getDescription()
      The description of the filter.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the filter.
    • getRank

      @Stability(Stable) @Nullable public Number getRank()
      Specifies the position of the filter in the list of current filters.
    • setRank

      @Stability(Stable) public void setRank(@Nullable Number value)
      Specifies the position of the filter in the list of current filters.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags to be added to a new filter resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags to be added to a new filter resource.