# HeaderMatchPatternProperty

The filter to use to identify the subset of headers to inspect in a web request.

You must specify exactly one setting: either `All` , `IncludedHeaders` , or `ExcludedHeaders` .

Example JSON: `"MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", "KeyToExclude2" ] }`

- 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';

declare const all: any;
const headerMatchPatternProperty: wafv2.CfnWebACL.HeaderMatchPatternProperty = {
  all: all,
  excludedHeaders: ['excludedHeaders'],
  includedHeaders: ['includedHeaders'],
};
```

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

# all: Any

header_match_pattern_property = wafv2.CfnWebACL.HeaderMatchPatternProperty(
    all=all,
    excluded_headers=["excludedHeaders"],
    included_headers=["includedHeaders"]
)
```

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

Object all;

HeaderMatchPatternProperty headerMatchPatternProperty = HeaderMatchPatternProperty.builder()
        .all(all)
        .excludedHeaders(List.of("excludedHeaders"))
        .includedHeaders(List.of("includedHeaders"))
        .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 all;

var headerMatchPatternProperty = new HeaderMatchPatternProperty {
    All = all,
    ExcludedHeaders = new [] { "excludedHeaders" },
    IncludedHeaders = new [] { "includedHeaders" }
};
```

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"

var all interface{}

headerMatchPatternProperty := &HeaderMatchPatternProperty{
	All: all,
	ExcludedHeaders: []*string{
		jsii.String("excludedHeaders"),
	},
	IncludedHeaders: []*string{
		jsii.String("includedHeaders"),
	},
}
```

## Properties

- `all`: any — Inspect all headers.

- `excludedHeaders`: string[] — Inspect only the headers whose keys don't match any of the strings specified here.

- `includedHeaders`: string[] — Inspect only the headers that have a key that matches one of the strings specified here.
