# JsonMatchPatternProperty

The patterns to look for in the JSON body.

AWS WAF inspects the results of these pattern matches against the rule inspection criteria. This is used with the `FieldToMatch` option `JsonBody` .

- 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 jsonMatchPatternProperty: wafv2.CfnRuleGroup.JsonMatchPatternProperty = {
  all: all,
  includedPaths: ['includedPaths'],
};
```

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

json_match_pattern_property = wafv2.CfnRuleGroup.JsonMatchPatternProperty(
    all=all,
    included_paths=["includedPaths"]
)
```

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;

JsonMatchPatternProperty jsonMatchPatternProperty = JsonMatchPatternProperty.builder()
        .all(all)
        .includedPaths(List.of("includedPaths"))
        .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 jsonMatchPatternProperty = new JsonMatchPatternProperty {
    All = all,
    IncludedPaths = new [] { "includedPaths" }
};
```

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{}

jsonMatchPatternProperty := &JsonMatchPatternProperty{
	All: all,
	IncludedPaths: []*string{
		jsii.String("includedPaths"),
	},
}
```

## Properties

- `all`: any — Match all of the elements. See also `MatchScope` in the `JsonBody` `FieldToMatch` specification.

  You must specify either this setting or the `IncludedPaths` setting, but not both.

- `includedPaths`: string[] — Match only the specified include paths. See also `MatchScope` in the `JsonBody` `FieldToMatch` specification.

  Provide the include paths using JSON Pointer syntax. For example, `"IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]` . For information about this syntax, see the Internet Engineering Task Force (IETF) documentation [JavaScript Object Notation (JSON) Pointer](https://docs.aws.amazon.com/https://tools.ietf.org/html/rfc6901) .

  You must specify either this setting or the `All` setting, but not both.

  > Don't use this option to include all paths. Instead, use the `All` setting.
