Skip to content
v2.278.0

CookieMatchPatternProperty Struct ​

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

You must specify exactly one setting: either All , IncludedCookies , or ExcludedCookies .

Example JSON: "MatchPattern": { "IncludedCookies": [ "session-id-time", "session-id" ] }

Example ​

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 cookieMatchPatternProperty: wafv2.CfnRuleGroup.CookieMatchPatternProperty = {
  all: all,
  excludedCookies: ['excludedCookies'],
  includedCookies: ['includedCookies'],
};
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

cookie_match_pattern_property = wafv2.CfnRuleGroup.CookieMatchPatternProperty(
    all=all,
    excluded_cookies=["excludedCookies"],
    included_cookies=["includedCookies"]
)
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;

CookieMatchPatternProperty cookieMatchPatternProperty = CookieMatchPatternProperty.builder()
        .all(all)
        .excludedCookies(List.of("excludedCookies"))
        .includedCookies(List.of("includedCookies"))
        .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.WAFv2;

var all;

var cookieMatchPatternProperty = new CookieMatchPatternProperty {
    All = all,
    ExcludedCookies = new [] { "excludedCookies" },
    IncludedCookies = new [] { "includedCookies" }
};
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{}

cookieMatchPatternProperty := &CookieMatchPatternProperty{
	All: all,
	ExcludedCookies: []*string{
		jsii.String("excludedCookies"),
	},
	IncludedCookies: []*string{
		jsii.String("includedCookies"),
	},
}

Properties ​

alloptionalanyalloptionalAnyalloptionalObjectAlloptionalobjectAlloptionalinterface{} #
Inspect all cookies.
excludedCookiesoptionalstring[]excluded_cookiesoptionaltyping.List[str]excludedCookiesoptionalList<String>ExcludedCookiesoptionalstring[]ExcludedCookiesoptional*[]*string #
Inspect only the cookies whose keys don't match any of the strings specified here.
includedCookiesoptionalstring[]included_cookiesoptionaltyping.List[str]includedCookiesoptionalList<String>IncludedCookiesoptionalstring[]IncludedCookiesoptional*[]*string #
Inspect only the cookies that have a key that matches one of the strings specified here.