aws-cdk-lib.aws_wafv2.CfnLoggingConfiguration.FieldToMatchProperty

interface FieldToMatchProperty

LanguageType name
.NETAmazon.CDK.AWS.WAFv2.CfnLoggingConfiguration.FieldToMatchProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awswafv2#CfnLoggingConfiguration_FieldToMatchProperty
Javasoftware.amazon.awscdk.services.wafv2.CfnLoggingConfiguration.FieldToMatchProperty
Pythonaws_cdk.aws_wafv2.CfnLoggingConfiguration.FieldToMatchProperty
TypeScript aws-cdk-lib » aws_wafv2 » CfnLoggingConfiguration » FieldToMatchProperty

The parts of the request that you want to keep out of the logs.

This is used in the logging configuration RedactedFields specification.

Example JSON for a QueryString field to match:

"FieldToMatch": { "QueryString": {} }

Example JSON for a Method field to match specification:

"FieldToMatch": { "Method": { "Name": "DELETE" } }

Example

// 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 jsonBody: any;
declare const method: any;
declare const queryString: any;
declare const singleHeader: any;
declare const uriPath: any;
const fieldToMatchProperty: wafv2.CfnLoggingConfiguration.FieldToMatchProperty = {
  jsonBody: jsonBody,
  method: method,
  queryString: queryString,
  singleHeader: singleHeader,
  uriPath: uriPath,
};

Properties

NameTypeDescription
jsonBody?anyRedact the request body JSON.
method?anyRedact the indicated HTTP method.
queryString?anyRedact the query string.
singleHeader?anyRedact a single header.
uriPath?anyRedact the request URI path.

jsonBody?

Type: any (optional)

Redact the request body JSON.


method?

Type: any (optional)

Redact the indicated HTTP method.

The method indicates the type of operation that the request is asking the origin to perform.


queryString?

Type: any (optional)

Redact the query string.

This is the part of a URL that appears after a ? character, if any.


singleHeader?

Type: any (optional)

Redact a single header.

Provide the name of the header to inspect, for example, User-Agent or Referer . This setting isn't case sensitive.

Example JSON: "SingleHeader": { "Name": "haystack" }


uriPath?

Type: any (optional)

Redact the request URI path.

This is the part of the web request that identifies a resource, for example, /images/daily-ad.jpg .