FieldToMatchProperty Struct
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" } }
| Source | |
|---|---|
| Type last changed |
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 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,
};
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
# json_body: Any
# method: Any
# query_string: Any
# single_header: Any
# uri_path: Any
field_to_match_property = wafv2.CfnLoggingConfiguration.FieldToMatchProperty(
json_body=json_body,
method=method,
query_string=query_string,
single_header=single_header,
uri_path=uri_path
)
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 jsonBody;
Object method;
Object queryString;
Object singleHeader;
Object uriPath;
FieldToMatchProperty fieldToMatchProperty = FieldToMatchProperty.builder()
.jsonBody(jsonBody)
.method(method)
.queryString(queryString)
.singleHeader(singleHeader)
.uriPath(uriPath)
.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 jsonBody;
var method;
var queryString;
var singleHeader;
var uriPath;
var fieldToMatchProperty = new FieldToMatchProperty {
JsonBody = jsonBody,
Method = method,
QueryString = queryString,
SingleHeader = singleHeader,
UriPath = uriPath
};
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 jsonBody interface{}
var method interface{}
var queryString interface{}
var singleHeader interface{}
var uriPath interface{}
fieldToMatchProperty := &FieldToMatchProperty{
JsonBody: jsonBody,
Method: method,
QueryString: queryString,
SingleHeader: singleHeader,
UriPath: uriPath,
}
Properties
jsonBodyoptionalanyjson_bodyoptionalAnyjsonBodyoptionalObjectJsonBodyoptionalobjectJsonBodyoptionalinterface{} #methodoptionalanymethodoptionalAnymethodoptionalObjectMethodoptionalobjectMethodoptionalinterface{} #Redact the indicated HTTP method.
The method indicates the type of operation that the request is asking the origin to perform.
queryStringoptionalanyquery_stringoptionalAnyqueryStringoptionalObjectQueryStringoptionalobjectQueryStringoptionalinterface{} #Redact the query string.
This is the part of a URL that appears after a ? character, if any.
singleHeaderoptionalanysingle_headeroptionalAnysingleHeaderoptionalObjectSingleHeaderoptionalobjectSingleHeaderoptionalinterface{} #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" }
uriPathoptionalanyuri_pathoptionalAnyuriPathoptionalObjectUriPathoptionalobjectUriPathoptionalinterface{} #Redact the request URI path.
This is the part of the web request that identifies a resource, for example, /images/daily-ad.jpg .