Skip to content
v2.278.0

OcsfFindingFiltersProperty Struct ​

Specifies the filtering criteria for security findings using OCSF.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_securityhub as securityhub } from 'aws-cdk-lib';
const ocsfFindingFiltersProperty: securityhub.CfnAutomationRuleV2.OcsfFindingFiltersProperty = {
  compositeFilters: [{
    booleanFilters: [{
      fieldName: 'fieldName',
      filter: {
        value: false,
      },
    }],
    dateFilters: [{
      fieldName: 'fieldName',
      filter: {
        dateRange: {
          unit: 'unit',
          value: 123,
        },
        end: 'end',
        start: 'start',
      },
    }],
    mapFilters: [{
      fieldName: 'fieldName',
      filter: {
        comparison: 'comparison',
        key: 'key',
        value: 'value',
      },
    }],
    numberFilters: [{
      fieldName: 'fieldName',
      filter: {
        eq: 123,
        gte: 123,
        lte: 123,
      },
    }],
    operator: 'operator',
    stringFilters: [{
      fieldName: 'fieldName',
      filter: {
        comparison: 'comparison',
        value: 'value',
      },
    }],
  }],
  compositeOperator: 'compositeOperator',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_securityhub as securityhub

ocsf_finding_filters_property = securityhub.CfnAutomationRuleV2.OcsfFindingFiltersProperty(
    composite_filters=[securityhub.CfnAutomationRuleV2.CompositeFilterProperty(
        boolean_filters=[securityhub.CfnAutomationRuleV2.OcsfBooleanFilterProperty(
            field_name="fieldName",
            filter=securityhub.CfnAutomationRuleV2.BooleanFilterProperty(
                value=False
            )
        )],
        date_filters=[securityhub.CfnAutomationRuleV2.OcsfDateFilterProperty(
            field_name="fieldName",
            filter=securityhub.CfnAutomationRuleV2.DateFilterProperty(
                date_range=securityhub.CfnAutomationRuleV2.DateRangeProperty(
                    unit="unit",
                    value=123
                ),
                end="end",
                start="start"
            )
        )],
        map_filters=[securityhub.CfnAutomationRuleV2.OcsfMapFilterProperty(
            field_name="fieldName",
            filter=securityhub.CfnAutomationRuleV2.MapFilterProperty(
                comparison="comparison",
                key="key",
                value="value"
            )
        )],
        number_filters=[securityhub.CfnAutomationRuleV2.OcsfNumberFilterProperty(
            field_name="fieldName",
            filter=securityhub.CfnAutomationRuleV2.NumberFilterProperty(
                eq=123,
                gte=123,
                lte=123
            )
        )],
        operator="operator",
        string_filters=[securityhub.CfnAutomationRuleV2.OcsfStringFilterProperty(
            field_name="fieldName",
            filter=securityhub.CfnAutomationRuleV2.StringFilterProperty(
                comparison="comparison",
                value="value"
            )
        )]
    )],
    composite_operator="compositeOperator"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.securityhub.*;

OcsfFindingFiltersProperty ocsfFindingFiltersProperty = OcsfFindingFiltersProperty.builder()
        .compositeFilters(List.of(CompositeFilterProperty.builder()
                .booleanFilters(List.of(OcsfBooleanFilterProperty.builder()
                        .fieldName("fieldName")
                        .filter(BooleanFilterProperty.builder()
                                .value(false)
                                .build())
                        .build()))
                .dateFilters(List.of(OcsfDateFilterProperty.builder()
                        .fieldName("fieldName")
                        .filter(DateFilterProperty.builder()
                                .dateRange(DateRangeProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())
                                .end("end")
                                .start("start")
                                .build())
                        .build()))
                .mapFilters(List.of(OcsfMapFilterProperty.builder()
                        .fieldName("fieldName")
                        .filter(MapFilterProperty.builder()
                                .comparison("comparison")
                                .key("key")
                                .value("value")
                                .build())
                        .build()))
                .numberFilters(List.of(OcsfNumberFilterProperty.builder()
                        .fieldName("fieldName")
                        .filter(NumberFilterProperty.builder()
                                .eq(123)
                                .gte(123)
                                .lte(123)
                                .build())
                        .build()))
                .operator("operator")
                .stringFilters(List.of(OcsfStringFilterProperty.builder()
                        .fieldName("fieldName")
                        .filter(StringFilterProperty.builder()
                                .comparison("comparison")
                                .value("value")
                                .build())
                        .build()))
                .build()))
        .compositeOperator("compositeOperator")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SecurityHub;

var ocsfFindingFiltersProperty = new OcsfFindingFiltersProperty {
    CompositeFilters = new [] { new CompositeFilterProperty {
        BooleanFilters = new [] { new OcsfBooleanFilterProperty {
            FieldName = "fieldName",
            Filter = new BooleanFilterProperty {
                Value = false
            }
        } },
        DateFilters = new [] { new OcsfDateFilterProperty {
            FieldName = "fieldName",
            Filter = new DateFilterProperty {
                DateRange = new DateRangeProperty {
                    Unit = "unit",
                    Value = 123
                },
                End = "end",
                Start = "start"
            }
        } },
        MapFilters = new [] { new OcsfMapFilterProperty {
            FieldName = "fieldName",
            Filter = new MapFilterProperty {
                Comparison = "comparison",
                Key = "key",
                Value = "value"
            }
        } },
        NumberFilters = new [] { new OcsfNumberFilterProperty {
            FieldName = "fieldName",
            Filter = new NumberFilterProperty {
                Eq = 123,
                Gte = 123,
                Lte = 123
            }
        } },
        Operator = "operator",
        StringFilters = new [] { new OcsfStringFilterProperty {
            FieldName = "fieldName",
            Filter = new StringFilterProperty {
                Comparison = "comparison",
                Value = "value"
            }
        } }
    } },
    CompositeOperator = "compositeOperator"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

ocsfFindingFiltersProperty := &OcsfFindingFiltersProperty{
	CompositeFilters: []interface{}{
		&CompositeFilterProperty{
			BooleanFilters: []interface{}{
				&OcsfBooleanFilterProperty{
					FieldName: jsii.String("fieldName"),
					Filter: &BooleanFilterProperty{
						Value: jsii.Boolean(false),
					},
				},
			},
			DateFilters: []interface{}{
				&OcsfDateFilterProperty{
					FieldName: jsii.String("fieldName"),
					Filter: &DateFilterProperty{
						DateRange: &DateRangeProperty{
							Unit: jsii.String("unit"),
							Value: jsii.Number(123),
						},
						End: jsii.String("end"),
						Start: jsii.String("start"),
					},
				},
			},
			MapFilters: []interface{}{
				&OcsfMapFilterProperty{
					FieldName: jsii.String("fieldName"),
					Filter: &MapFilterProperty{
						Comparison: jsii.String("comparison"),
						Key: jsii.String("key"),
						Value: jsii.String("value"),
					},
				},
			},
			NumberFilters: []interface{}{
				&OcsfNumberFilterProperty{
					FieldName: jsii.String("fieldName"),
					Filter: &NumberFilterProperty{
						Eq: jsii.Number(123),
						Gte: jsii.Number(123),
						Lte: jsii.Number(123),
					},
				},
			},
			Operator: jsii.String("operator"),
			StringFilters: []interface{}{
				&OcsfStringFilterProperty{
					FieldName: jsii.String("fieldName"),
					Filter: &StringFilterProperty{
						Comparison: jsii.String("comparison"),
						Value: jsii.String("value"),
					},
				},
			},
		},
	},
	CompositeOperator: jsii.String("compositeOperator"),
}

Properties ​

compositeFiltersoptionalIResolvable | IResolvable | CfnAutomationRuleV2.CompositeFilterProperty[]composite_filtersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CompositeFilterProperty]]]compositeFiltersoptionalIResolvableCompositeFiltersoptionalIResolvableCompositeFiltersoptionalinterface{} #
Enables the creation of complex filtering conditions by combining filter criteria.
compositeOperatoroptionalstringcomposite_operatoroptionalstrcompositeOperatoroptionalStringCompositeOperatoroptionalstringCompositeOperatoroptional*string #
The logical operators used to combine the filtering on multiple `CompositeFilters` .