# LoggingFilterProperty

Filtering that specifies which web requests are kept in the logs and which are dropped, defined for a web ACL's `LoggingConfiguration` .

You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wafv2 as wafv2 } from 'aws-cdk-lib';
const loggingFilterProperty: wafv2.CfnLoggingConfiguration.LoggingFilterProperty = {
  defaultBehavior: 'defaultBehavior',
  filters: [{
    behavior: 'behavior',
    conditions: [{
      actionCondition: {
        action: 'action',
      },
      labelNameCondition: {
        labelName: 'labelName',
      },
    }],
    requirement: 'requirement',
  }],
};
```

Python:

```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_wafv2 as wafv2

logging_filter_property = wafv2.CfnLoggingConfiguration.LoggingFilterProperty(
    default_behavior="defaultBehavior",
    filters=[wafv2.CfnLoggingConfiguration.FilterProperty(
        behavior="behavior",
        conditions=[wafv2.CfnLoggingConfiguration.ConditionProperty(
            action_condition=wafv2.CfnLoggingConfiguration.ActionConditionProperty(
                action="action"
            ),
            label_name_condition=wafv2.CfnLoggingConfiguration.LabelNameConditionProperty(
                label_name="labelName"
            )
        )],
        requirement="requirement"
    )]
)
```

Java:

```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.wafv2.*;

LoggingFilterProperty loggingFilterProperty = LoggingFilterProperty.builder()
        .defaultBehavior("defaultBehavior")
        .filters(List.of(FilterProperty.builder()
                .behavior("behavior")
                .conditions(List.of(ConditionProperty.builder()
                        .actionCondition(ActionConditionProperty.builder()
                                .action("action")
                                .build())
                        .labelNameCondition(LabelNameConditionProperty.builder()
                                .labelName("labelName")
                                .build())
                        .build()))
                .requirement("requirement")
                .build()))
        .build();
```

C# / .NET:

```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.WAFv2;

var loggingFilterProperty = new LoggingFilterProperty {
    DefaultBehavior = "defaultBehavior",
    Filters = new [] { new FilterProperty {
        Behavior = "behavior",
        Conditions = new [] { new ConditionProperty {
            ActionCondition = new ActionConditionProperty {
                Action = "action"
            },
            LabelNameCondition = new LabelNameConditionProperty {
                LabelName = "labelName"
            }
        } },
        Requirement = "requirement"
    } }
};
```

Golang:

```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"

loggingFilterProperty := &LoggingFilterProperty{
	DefaultBehavior: jsii.String("defaultBehavior"),
	Filters: []interface{}{
		&FilterProperty{
			Behavior: jsii.String("behavior"),
			Conditions: []interface{}{
				&ConditionProperty{
					ActionCondition: &ActionConditionProperty{
						Action: jsii.String("action"),
					},
					LabelNameCondition: &LabelNameConditionProperty{
						LabelName: jsii.String("labelName"),
					},
				},
			},
			Requirement: jsii.String("requirement"),
		},
	},
}
```

## Properties

- `defaultBehavior`: string (required) — Default handling for logs that don't match any of the specified filtering conditions.

- `filters`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLoggingConfiguration.FilterProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_wafv2.CfnLoggingConfiguration.FilterProperty.html)[] (required) — The filters that you want to apply to the logs.
