CfnLoggingConfigurationProps
- class aws_cdk.aws_wafv2.CfnLoggingConfigurationProps(*, log_destination_configs, resource_arn, logging_filter=None, redacted_fields=None)
Bases:
object
Properties for defining a
CfnLoggingConfiguration
.- Parameters:
log_destination_configs (
Sequence
[str
]) – The logging destination configuration that you want to associate with the web ACL. .. epigraph:: You can associate one logging destination to a web ACL.resource_arn (
str
) – The Amazon Resource Name (ARN) of the web ACL that you want to associate withLogDestinationConfigs
.logging_filter (
Optional
[Any
]) – 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.redacted_fields (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,FieldToMatchProperty
,Dict
[str
,Any
]]],None
]) – The parts of the request that you want to keep out of the logs. For example, if you redact theSingleHeader
field, theHEADER
field in the logs will beREDACTED
for all rules that use theSingleHeader
FieldToMatch
setting. Redaction applies only to the component that’s specified in the rule’sFieldToMatch
setting, so theSingleHeader
redaction doesn’t apply to rules that use theHeaders
FieldToMatch
. .. epigraph:: You can specify only the following fields for redaction:UriPath
,QueryString
,SingleHeader
, andMethod
.
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_wafv2 as wafv2 # json_body: Any # logging_filter: Any # method: Any # query_string: Any # single_header: Any # uri_path: Any cfn_logging_configuration_props = wafv2.CfnLoggingConfigurationProps( log_destination_configs=["logDestinationConfigs"], resource_arn="resourceArn", # the properties below are optional logging_filter=logging_filter, redacted_fields=[wafv2.CfnLoggingConfiguration.FieldToMatchProperty( json_body=json_body, method=method, query_string=query_string, single_header=single_header, uri_path=uri_path )] )
Attributes
- log_destination_configs
The logging destination configuration that you want to associate with the web ACL.
You can associate one logging destination to a web ACL.
- logging_filter
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.
- redacted_fields
The parts of the request that you want to keep out of the logs.
For example, if you redact the
SingleHeader
field, theHEADER
field in the logs will beREDACTED
for all rules that use theSingleHeader
FieldToMatch
setting.Redaction applies only to the component that’s specified in the rule’s
FieldToMatch
setting, so theSingleHeader
redaction doesn’t apply to rules that use theHeaders
FieldToMatch
. .. epigraph:You can specify only the following fields for redaction: ``UriPath`` , ``QueryString`` , ``SingleHeader`` , and ``Method`` .
- resource_arn
The Amazon Resource Name (ARN) of the web ACL that you want to associate with
LogDestinationConfigs
.