CfnLoggingConfigurationProps Struct
Properties for defining a CfnLoggingConfiguration.
| Source | |
|---|---|
| Type last changed |
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,
}],
};
# 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
# 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
)]
)
// 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 loggingFilter;
Object method;
Object queryString;
Object singleHeader;
Object uriPath;
CfnLoggingConfigurationProps cfnLoggingConfigurationProps = CfnLoggingConfigurationProps.builder()
.logDestinationConfigs(List.of("logDestinationConfigs"))
.resourceArn("resourceArn")
// the properties below are optional
.loggingFilter(loggingFilter)
.redactedFields(List.of(FieldToMatchProperty.builder()
.jsonBody(jsonBody)
.method(method)
.queryString(queryString)
.singleHeader(singleHeader)
.uriPath(uriPath)
.build()))
.build();
// 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 loggingFilter;
var method;
var queryString;
var singleHeader;
var uriPath;
var cfnLoggingConfigurationProps = new CfnLoggingConfigurationProps {
LogDestinationConfigs = new [] { "logDestinationConfigs" },
ResourceArn = "resourceArn",
// the properties below are optional
LoggingFilter = loggingFilter,
RedactedFields = new [] { new FieldToMatchProperty {
JsonBody = jsonBody,
Method = method,
QueryString = queryString,
SingleHeader = singleHeader,
UriPath = uriPath
} }
};
// 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 loggingFilter interface{}
var method interface{}
var queryString interface{}
var singleHeader interface{}
var uriPath interface{}
cfnLoggingConfigurationProps := &CfnLoggingConfigurationProps{
LogDestinationConfigs: []interface{}{
jsii.String("logDestinationConfigs"),
},
ResourceArn: jsii.String("resourceArn"),
// the properties below are optional
LoggingFilter: loggingFilter,
RedactedFields: []interface{}{
&FieldToMatchProperty{
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.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 #