aws-cdk-lib.aws_wafv2.CfnLoggingConfigurationProps

interface CfnLoggingConfigurationProps

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

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

NameTypeDescription
logDestinationConfigsstring[]The logging destination configuration that you want to associate with the web ACL.
resourceArnstringThe Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs .
loggingFilter?anyFiltering that specifies which web requests are kept in the logs and which are dropped.
redactedFields?IResolvable | IResolvable | FieldToMatchProperty[]The parts of the request that you want to keep out of the logs.

logDestinationConfigs

Type: string[]

The logging destination configuration that you want to associate with the web ACL.

You can associate one logging destination to a web ACL.


resourceArn

Type: string

The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs .


loggingFilter?

Type: any (optional)

Filtering that specifies which web requests are kept in the logs and which are dropped.

You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.


redactedFields?

Type: IResolvable | IResolvable | FieldToMatchProperty[] (optional)

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

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.

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 , and Method .