interface CfnLoggingConfigurationProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.WAFv2.CfnLoggingConfigurationProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awswafv2#CfnLoggingConfigurationProps |
Java | software.amazon.awscdk.services.wafv2.CfnLoggingConfigurationProps |
Python | aws_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
Name | Type | Description |
---|---|---|
log | string[] | The logging destination configuration that you want to associate with the web ACL. |
resource | string | The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs . |
logging | any | Filtering that specifies which web requests are kept in the logs and which are dropped. |
redacted | IResolvable | IResolvable | Field [] | 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
|
Field
[]
(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
, andMethod
. > This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.