CfnLoggingConfigurationProps Struct
Properties for defining a CfnLoggingConfiguration.
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 loggingFilter: any;
declare const method: any;
declare const queryString: any;
declare const singleHeader: any;
declare const uriPath: any;
const cfnLoggingConfigurationProps: wafv2.CfnLoggingConfigurationProps = {
logDestinationConfigs: ['logDestinationConfigs'],
resourceArn: 'resourceArn',
// the properties below are optional
loggingFilter: loggingFilter,
redactedFields: [{
jsonBody: jsonBody,
method: method,
queryString: queryString,
singleHeader: singleHeader,
uriPath: uriPath,
}],
};
Properties
logDestinationConfigsstring | IDeliveryStreamRef | ILogGroupRef | IBucketRef[]log_destination_configstyping.List[typing.Union[str, IDeliveryStreamRef, ILogGroupRef, IBucketRef]]logDestinationConfigsList<String>LogDestinationConfigsstring[]LogDestinationConfigs*[]interface{}required#You can associate one logging destination to a web ACL.
loggingFilteroptionalanylogging_filteroptionalAnyloggingFilteroptionalObjectLoggingFilteroptionalobjectLoggingFilteroptionalinterface{}#You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.
redactedFieldsoptionalIResolvable | IResolvable | CfnLoggingConfiguration.FieldToMatchProperty[]redacted_fieldsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, FieldToMatchProperty]]]redactedFieldsoptionalIResolvableRedactedFieldsoptionalIResolvableRedactedFieldsoptionalinterface{}#notes
For example, if you redact the SingleHeader field, the HEADER field in the logs will be REDACTED for all rules that use the SingleHeader FieldToMatch setting.
If you configure data protection for the web ACL, the protection applies to the data that AWS WAF sends to the logs.
Redaction applies only to the component that's specified in the rule's FieldToMatch setting, so the SingleHeader redaction doesn't apply to rules that use the Headers FieldToMatch .
You can specify only the following fields for redaction:
UriPath,QueryString,SingleHeader, andMethod. > This setting has no impact on request sampling. You can only exclude fields from request sampling by disabling sampling in the web ACL visibility configuration or by configuring data protection for the web ACL.
resourceArnstring | IWebACLRefresource_arntyping.Union[str, IWebACLRef]resourceArnStringResourceArnstringResourceArninterface{}required#