CfnWebACLProps Struct
Properties for defining a CfnWebACL.
Example
// The generated example for this type would exceed 500 lines,
// and has been elided for readability.
Properties
applicationConfigoptionalIResolvable | CfnWebACL.ApplicationConfigPropertyapplication_configoptionaltyping.Union[IResolvable, ApplicationConfigProperty]applicationConfigoptionalIResolvableApplicationConfigoptionalIResolvableApplicationConfigoptionalinterface{}#associationConfigoptionalIResolvable | CfnWebACL.AssociationConfigPropertyassociation_configoptionaltyping.Union[IResolvable, AssociationConfigProperty]associationConfigoptionalIResolvableAssociationConfigoptionalIResolvableAssociationConfigoptionalinterface{}#notes
Use this to customize the maximum size of the request body that your protected resources forward to AWS WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes).
You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see AWS WAF Pricing .
For Application Load Balancer and AWS AppSync , the limit is fixed at 8 KB (8,192 bytes).
captchaConfigoptionalIResolvable | CfnWebACL.CaptchaConfigPropertycaptcha_configoptionaltyping.Union[IResolvable, CaptchaConfigProperty]captchaConfigoptionalIResolvableCaptchaConfigoptionalIResolvableCaptchaConfigoptionalinterface{}#If you don't specify this, AWS WAF uses its default settings for CaptchaConfig .
challengeConfigoptionalIResolvable | CfnWebACL.ChallengeConfigPropertychallenge_configoptionaltyping.Union[IResolvable, ChallengeConfigProperty]challengeConfigoptionalIResolvableChallengeConfigoptionalIResolvableChallengeConfigoptionalinterface{}#If you don't specify this, AWS WAF uses its default settings for ChallengeConfig .
customResponseBodiesoptionalIResolvable | { [key: string]: IResolvable | CfnWebACL.CustomResponseBodyProperty }custom_response_bodiesoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.Union[IResolvable, CustomResponseBodyProperty]]]customResponseBodiesoptionalIResolvableCustomResponseBodiesoptionalIResolvableCustomResponseBodiesoptionalinterface{}#notes
When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.
For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .
For information about the limits on count and size for custom request and response settings, see AWS WAF quotas in the AWS WAF Developer Guide .
dataProtectionConfigoptionalIResolvable | CfnWebACL.DataProtectionConfigPropertydata_protection_configoptionaltyping.Union[IResolvable, DataProtectionConfigProperty]dataProtectionConfigoptionalIResolvableDataProtectionConfigoptionalIResolvableDataProtectionConfigoptionalinterface{}#notes
This is a web ACL level data protection option.
The data protection that you configure for the web ACL alters the data that's available for any other data collection activity, including your AWS WAF logging destinations, web ACL request sampling, and Amazon Security Lake data collection and management. Your other option for data protection is in the logging configuration, which only affects logging.
defaultActionIResolvable | CfnWebACL.DefaultActionPropertydefault_actiontyping.Union[IResolvable, DefaultActionProperty]defaultActionIResolvableDefaultActionIResolvableDefaultActioninterface{}required#descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#monetizationConfigoptionalIResolvable | CfnWebACL.MonetizationConfigPropertymonetization_configoptionaltyping.Union[IResolvable, MonetizationConfigProperty]monetizationConfigoptionalIResolvableMonetizationConfigoptionalIResolvableMonetizationConfigoptionalinterface{}#You cannot change the name of a web ACL after you create it.
onSourceDDoSProtectionConfigoptionalIResolvable | CfnWebACL.OnSourceDDoSProtectionConfigPropertyon_source_d_do_s_protection_configoptionaltyping.Union[IResolvable, OnSourceDDoSProtectionConfigProperty]onSourceDDoSProtectionConfigoptionalIResolvableOnSourceDDoSProtectionConfigoptionalIResolvableOnSourceDDoSProtectionConfigoptionalinterface{}#rulesoptionalIResolvable | IResolvable | CfnWebACL.RuleProperty[]rulesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, RuleProperty]]]rulesoptionalIResolvableRulesoptionalIResolvableRulesoptionalinterface{}#Each rule includes one top-level statement that AWS WAF uses to identify matching web requests, and parameters that govern how AWS WAF handles them.
notes
For an AWS Amplify application, use CLOUDFRONT . A regional application can be an Application Load Balancer (ALB), an REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are CLOUDFRONT and REGIONAL .
For
CLOUDFRONT, you must create your WAFv2 resources in the US East (N. Virginia) Region,us-east-1.
For information about how to define the association of the web ACL with your resource, see WebACLAssociation .
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#notes
The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
tokenDomainsoptionalstring[]token_domainsoptionaltyping.List[str]tokenDomainsoptionalList<String>TokenDomainsoptionalstring[]TokenDomainsoptional*[]*string#notes
This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.
visibilityConfigIResolvable | CfnWebACL.VisibilityConfigPropertyvisibility_configtyping.Union[IResolvable, VisibilityConfigProperty]visibilityConfigIResolvableVisibilityConfigIResolvableVisibilityConfiginterface{}required#