@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:46.732Z") public class CfnFilter extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnFilter.Builder
A fluent builder for
CfnFilter . |
static interface |
CfnFilter.ConditionProperty
Specifies the condition to apply to a single field when filtering through findings.
|
static interface |
CfnFilter.FindingCriteriaProperty
Represents a map of finding properties that match specified conditions and values when querying findings.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnFilter(Construct scope,
java.lang.String id,
CfnFilterProps props)
Create a new `AWS::GuardDuty::Filter`.
|
protected |
CfnFilter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnFilter(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAction()
Specifies the action that is to be applied to the findings that match the filter.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDescription()
The description of the filter.
|
java.lang.String |
getDetectorId()
The ID of the detector belonging to the GuardDuty account that you want to create a filter for.
|
java.lang.Object |
getFindingCriteria()
Represents the criteria to be used in the filter for querying findings.
|
java.lang.String |
getName()
The name of the filter.
|
java.lang.Number |
getRank()
Specifies the position of the filter in the list of current filters.
|
TagManager |
getTags()
The tags to be added to a new filter resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAction(java.lang.String value)
Specifies the action that is to be applied to the findings that match the filter.
|
void |
setDescription(java.lang.String value)
The description of the filter.
|
void |
setDetectorId(java.lang.String value)
The ID of the detector belonging to the GuardDuty account that you want to create a filter for.
|
void |
setFindingCriteria(CfnFilter.FindingCriteriaProperty value)
Represents the criteria to be used in the filter for querying findings.
|
void |
setFindingCriteria(IResolvable value)
Represents the criteria to be used in the filter for querying findings.
|
void |
setName(java.lang.String value)
The name of the filter.
|
void |
setRank(java.lang.Number value)
Specifies the position of the filter in the list of current filters.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnFilter(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnFilter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnFilter(Construct scope, java.lang.String id, CfnFilterProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
Each tag consists of a key and an optional value, both of which you define.
For more information, see Tag .
public java.lang.String getAction()
public void setAction(java.lang.String value)
public java.lang.String getDescription()
Valid special characters include period (.), underscore (_), dash (-), and whitespace. The new line character is considered to be an invalid input for description.
public void setDescription(java.lang.String value)
Valid special characters include period (.), underscore (_), dash (-), and whitespace. The new line character is considered to be an invalid input for description.
public java.lang.String getDetectorId()
public void setDetectorId(java.lang.String value)
public java.lang.Object getFindingCriteria()
public void setFindingCriteria(IResolvable value)
public void setFindingCriteria(CfnFilter.FindingCriteriaProperty value)
public java.lang.String getName()
Valid characters include period (.), underscore (_), dash (-), and alphanumeric characters. A whitespace is considered to be an invalid character.
public void setName(java.lang.String value)
Valid characters include period (.), underscore (_), dash (-), and alphanumeric characters. A whitespace is considered to be an invalid character.
public java.lang.Number getRank()
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" ]
.
public void setRank(java.lang.Number value)
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" ]
.