Package software.amazon.awscdk.services.wafv2
AWS::WAFv2 Construct Library
---
AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2.
For more information on how to migrate, see the Migrating to AWS CDK v2 guide.
This module is part of the AWS Cloud Development Kit project.
import software.amazon.awscdk.services.wafv2.*;
There are no official hand-written (L2) constructs for this service yet. Here are some suggestions on how to proceed:
- Search Construct Hub for WAFv2 construct libraries
- Use the automatically generated L1 constructs, in the same way you would use the CloudFormation AWS::WAFv2 resources directly.
There are no hand-written (L2) constructs for this service yet. However, you can still use the automatically generated L1 constructs, and use this service exactly as you would using CloudFormation directly.
For more information on the resources and properties available for this service, see the CloudFormation documentation for AWS::WAFv2.
(Read the CDK Contributing Guide and submit an RFC if you are interested in contributing to this construct library.)
Deprecated: AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html
-
ClassDescriptionA CloudFormation
AWS::WAFv2::IPSet
.A fluent builder forCfnIPSet
.Properties for defining aCfnIPSet
.A builder forCfnIPSetProps
An implementation forCfnIPSetProps
A CloudFormationAWS::WAFv2::LoggingConfiguration
.A single action condition for a condition in a logging filter.A builder forCfnLoggingConfiguration.ActionConditionProperty
An implementation forCfnLoggingConfiguration.ActionConditionProperty
A fluent builder forCfnLoggingConfiguration
.A single match condition for a log filter.A builder forCfnLoggingConfiguration.ConditionProperty
An implementation forCfnLoggingConfiguration.ConditionProperty
The parts of the request that you want to keep out of the logs.A builder forCfnLoggingConfiguration.FieldToMatchProperty
An implementation forCfnLoggingConfiguration.FieldToMatchProperty
A single logging filter, used inLoggingFilter
.A builder forCfnLoggingConfiguration.FilterProperty
An implementation forCfnLoggingConfiguration.FilterProperty
Inspect the body of the web request as JSON.A builder forCfnLoggingConfiguration.JsonBodyProperty
An implementation forCfnLoggingConfiguration.JsonBodyProperty
A single label name condition for a condition in a logging filter.A builder forCfnLoggingConfiguration.LabelNameConditionProperty
An implementation forCfnLoggingConfiguration.LabelNameConditionProperty
Filtering that specifies which web requests are kept in the logs and which are dropped, defined for a web ACL'sLoggingConfiguration
.A builder forCfnLoggingConfiguration.LoggingFilterProperty
An implementation forCfnLoggingConfiguration.LoggingFilterProperty
The patterns to look for in the JSON body.A builder forCfnLoggingConfiguration.MatchPatternProperty
An implementation forCfnLoggingConfiguration.MatchPatternProperty
Inspect one of the headers in the web request, identified by name, for example,User-Agent
orReferer
.A builder forCfnLoggingConfiguration.SingleHeaderProperty
An implementation forCfnLoggingConfiguration.SingleHeaderProperty
Properties for defining aCfnLoggingConfiguration
.A builder forCfnLoggingConfigurationProps
An implementation forCfnLoggingConfigurationProps
A CloudFormationAWS::WAFv2::RegexPatternSet
.A fluent builder forCfnRegexPatternSet
.Properties for defining aCfnRegexPatternSet
.A builder forCfnRegexPatternSetProps
An implementation forCfnRegexPatternSetProps
A CloudFormationAWS::WAFv2::RuleGroup
.Example:A builder forCfnRuleGroup.AllowProperty
An implementation forCfnRuleGroup.AllowProperty
A logical rule statement used to combine other rule statements with AND logic.A builder forCfnRuleGroup.AndStatementProperty
An implementation forCfnRuleGroup.AndStatementProperty
Example:A builder forCfnRuleGroup.BlockProperty
An implementation forCfnRuleGroup.BlockProperty
Inspect the body of the web request.A builder forCfnRuleGroup.BodyProperty
An implementation forCfnRuleGroup.BodyProperty
A fluent builder forCfnRuleGroup
.A rule statement that defines a string match search for AWS WAF to apply to web requests.A builder forCfnRuleGroup.ByteMatchStatementProperty
An implementation forCfnRuleGroup.ByteMatchStatementProperty
Specifies how AWS WAF should handleCAPTCHA
evaluations.A builder forCfnRuleGroup.CaptchaConfigProperty
An implementation forCfnRuleGroup.CaptchaConfigProperty
Example:A builder forCfnRuleGroup.CaptchaProperty
An implementation forCfnRuleGroup.CaptchaProperty
Specifies how AWS WAF should handleChallenge
evaluations.A builder forCfnRuleGroup.ChallengeConfigProperty
An implementation forCfnRuleGroup.ChallengeConfigProperty
Example:A builder forCfnRuleGroup.ChallengeProperty
An implementation forCfnRuleGroup.ChallengeProperty
The filter to use to identify the subset of cookies to inspect in a web request.A builder forCfnRuleGroup.CookieMatchPatternProperty
An implementation forCfnRuleGroup.CookieMatchPatternProperty
Inspect the cookies in the web request.A builder forCfnRuleGroup.CookiesProperty
An implementation forCfnRuleGroup.CookiesProperty
Example:A builder forCfnRuleGroup.CountProperty
An implementation forCfnRuleGroup.CountProperty
A custom header for custom request and response handling.A builder forCfnRuleGroup.CustomHTTPHeaderProperty
An implementation forCfnRuleGroup.CustomHTTPHeaderProperty
Custom request handling behavior that inserts custom headers into a web request.A builder forCfnRuleGroup.CustomRequestHandlingProperty
An implementation forCfnRuleGroup.CustomRequestHandlingProperty
The response body to use in a custom response to a web request.A builder forCfnRuleGroup.CustomResponseBodyProperty
An implementation forCfnRuleGroup.CustomResponseBodyProperty
A custom response to send to the client.A builder forCfnRuleGroup.CustomResponseProperty
An implementation forCfnRuleGroup.CustomResponseProperty
The part of the web request that you want AWS WAF to inspect.A builder forCfnRuleGroup.FieldToMatchProperty
An implementation forCfnRuleGroup.FieldToMatchProperty
The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.A builder forCfnRuleGroup.ForwardedIPConfigurationProperty
An implementation forCfnRuleGroup.ForwardedIPConfigurationProperty
A rule statement that labels web requests by country and region and that matches against web requests based on country code.A builder forCfnRuleGroup.GeoMatchStatementProperty
An implementation forCfnRuleGroup.GeoMatchStatementProperty
The filter to use to identify the subset of headers to inspect in a web request.A builder forCfnRuleGroup.HeaderMatchPatternProperty
An implementation forCfnRuleGroup.HeaderMatchPatternProperty
Inspect all headers in the web request.A builder forCfnRuleGroup.HeadersProperty
An implementation forCfnRuleGroup.HeadersProperty
Used for CAPTCHA and challenge token settings.A builder forCfnRuleGroup.ImmunityTimePropertyProperty
An implementation forCfnRuleGroup.ImmunityTimePropertyProperty
The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.A builder forCfnRuleGroup.IPSetForwardedIPConfigurationProperty
An implementation forCfnRuleGroup.IPSetForwardedIPConfigurationProperty
A rule statement used to detect web requests coming from particular IP addresses or address ranges.A builder forCfnRuleGroup.IPSetReferenceStatementProperty
An implementation forCfnRuleGroup.IPSetReferenceStatementProperty
Inspect the body of the web request as JSON.A builder forCfnRuleGroup.JsonBodyProperty
An implementation forCfnRuleGroup.JsonBodyProperty
The patterns to look for in the JSON body.A builder forCfnRuleGroup.JsonMatchPatternProperty
An implementation forCfnRuleGroup.JsonMatchPatternProperty
A rule statement to match against labels that have been added to the web request by rules that have already run in the web ACL.A builder forCfnRuleGroup.LabelMatchStatementProperty
An implementation forCfnRuleGroup.LabelMatchStatementProperty
A single label container.A builder forCfnRuleGroup.LabelProperty
An implementation forCfnRuleGroup.LabelProperty
List of labels used by one or more of the rules of aRuleGroup
.A builder forCfnRuleGroup.LabelSummaryProperty
An implementation forCfnRuleGroup.LabelSummaryProperty
A logical rule statement used to negate the results of another rule statement.A builder forCfnRuleGroup.NotStatementProperty
An implementation forCfnRuleGroup.NotStatementProperty
A logical rule statement used to combine other rule statements with OR logic.A builder forCfnRuleGroup.OrStatementProperty
An implementation forCfnRuleGroup.OrStatementProperty
A rate-based rule tracks the rate of requests for each originating IP address, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any 5-minute time span.A builder forCfnRuleGroup.RateBasedStatementProperty
An implementation forCfnRuleGroup.RateBasedStatementProperty
A rule statement used to search web request components for a match against a single regular expression.A builder forCfnRuleGroup.RegexMatchStatementProperty
An implementation forCfnRuleGroup.RegexMatchStatementProperty
A rule statement used to search web request components for matches with regular expressions.A builder forCfnRuleGroup.RegexPatternSetReferenceStatementProperty
An implementation forCfnRuleGroup.RegexPatternSetReferenceStatementProperty
The action that AWS WAF should take on a web request when it matches a rule's statement.A builder forCfnRuleGroup.RuleActionProperty
An implementation forCfnRuleGroup.RuleActionProperty
A single rule, which you can use in aWebACL
orRuleGroup
to identify web requests that you want to allow, block, or count.A builder forCfnRuleGroup.RuleProperty
An implementation forCfnRuleGroup.RuleProperty
Inspect one of the headers in the web request, identified by name, for example,User-Agent
orReferer
.A builder forCfnRuleGroup.SingleHeaderProperty
An implementation forCfnRuleGroup.SingleHeaderProperty
Inspect one query argument in the web request, identified by name, for example UserName or SalesRegion .A builder forCfnRuleGroup.SingleQueryArgumentProperty
An implementation forCfnRuleGroup.SingleQueryArgumentProperty
A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<).A builder forCfnRuleGroup.SizeConstraintStatementProperty
An implementation forCfnRuleGroup.SizeConstraintStatementProperty
A rule statement that inspects for malicious SQL code.A builder forCfnRuleGroup.SqliMatchStatementProperty
An implementation forCfnRuleGroup.SqliMatchStatementProperty
The processing guidance for a rule, used by AWS WAF to determine whether a web request matches the rule.A builder forCfnRuleGroup.StatementProperty
An implementation forCfnRuleGroup.StatementProperty
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.A builder forCfnRuleGroup.TextTransformationProperty
An implementation forCfnRuleGroup.TextTransformationProperty
Defines and enables Amazon CloudWatch metrics and web request sample collection.A builder forCfnRuleGroup.VisibilityConfigProperty
An implementation forCfnRuleGroup.VisibilityConfigProperty
A rule statement that inspects for cross-site scripting (XSS) attacks.A builder forCfnRuleGroup.XssMatchStatementProperty
An implementation forCfnRuleGroup.XssMatchStatementProperty
Properties for defining aCfnRuleGroup
.A builder forCfnRuleGroupProps
An implementation forCfnRuleGroupProps
A CloudFormationAWS::WAFv2::WebACL
.Specifies that AWS WAF should allow the request and optionally defines additional custom handling for the request.A builder forCfnWebACL.AllowActionProperty
An implementation forCfnWebACL.AllowActionProperty
A logical rule statement used to combine other rule statements with AND logic.A builder forCfnWebACL.AndStatementProperty
An implementation forCfnWebACL.AndStatementProperty
Details for your use of the account takeover prevention managed rule group,AWSManagedRulesATPRuleSet
.A builder forCfnWebACL.AWSManagedRulesATPRuleSetProperty
An implementation forCfnWebACL.AWSManagedRulesATPRuleSetProperty
Details for your use of the Bot Control managed rule group, used inManagedRuleGroupConfig
.A builder forCfnWebACL.AWSManagedRulesBotControlRuleSetProperty
An implementation forCfnWebACL.AWSManagedRulesBotControlRuleSetProperty
Specifies that AWS WAF should block the request and optionally defines additional custom handling for the response to the web request.A builder forCfnWebACL.BlockActionProperty
An implementation forCfnWebACL.BlockActionProperty
Inspect the body of the web request.A builder forCfnWebACL.BodyProperty
An implementation forCfnWebACL.BodyProperty
A fluent builder forCfnWebACL
.A rule statement that defines a string match search for AWS WAF to apply to web requests.A builder forCfnWebACL.ByteMatchStatementProperty
An implementation forCfnWebACL.ByteMatchStatementProperty
Specifies that AWS WAF should run aCAPTCHA
check against the request:.A builder forCfnWebACL.CaptchaActionProperty
An implementation forCfnWebACL.CaptchaActionProperty
Specifies how AWS WAF should handleCAPTCHA
evaluations for rules that don't have their ownCaptchaConfig
settings.A builder forCfnWebACL.CaptchaConfigProperty
An implementation forCfnWebACL.CaptchaConfigProperty
Specifies that AWS WAF should run aChallenge
check against the request to verify that the request is coming from a legitimate client session: - If the request includes a valid, unexpired challenge token, AWS WAF applies any custom request handling and labels that you've configured and then allows the web request inspection to proceed to the next rule, similar to aCountAction
.A builder forCfnWebACL.ChallengeActionProperty
An implementation forCfnWebACL.ChallengeActionProperty
Specifies how AWS WAF should handleChallenge
evaluations.A builder forCfnWebACL.ChallengeConfigProperty
An implementation forCfnWebACL.ChallengeConfigProperty
The filter to use to identify the subset of cookies to inspect in a web request.A builder forCfnWebACL.CookieMatchPatternProperty
An implementation forCfnWebACL.CookieMatchPatternProperty
Inspect the cookies in the web request.A builder forCfnWebACL.CookiesProperty
An implementation forCfnWebACL.CookiesProperty
Specifies that AWS WAF should count the request.A builder forCfnWebACL.CountActionProperty
An implementation forCfnWebACL.CountActionProperty
A custom header for custom request and response handling.A builder forCfnWebACL.CustomHTTPHeaderProperty
An implementation forCfnWebACL.CustomHTTPHeaderProperty
Custom request handling behavior that inserts custom headers into a web request.A builder forCfnWebACL.CustomRequestHandlingProperty
An implementation forCfnWebACL.CustomRequestHandlingProperty
The response body to use in a custom response to a web request.A builder forCfnWebACL.CustomResponseBodyProperty
An implementation forCfnWebACL.CustomResponseBodyProperty
A custom response to send to the client.A builder forCfnWebACL.CustomResponseProperty
An implementation forCfnWebACL.CustomResponseProperty
In aWebACL
, this is the action that you want AWS WAF to perform when a web request doesn't match any of the rules in theWebACL
.A builder forCfnWebACL.DefaultActionProperty
An implementation forCfnWebACL.DefaultActionProperty
Specifies a single rule in a rule group whose action you want to override toCount
.A builder forCfnWebACL.ExcludedRuleProperty
An implementation forCfnWebACL.ExcludedRuleProperty
The identifier of the username or password field, used in theManagedRuleGroupConfig
settings.A builder forCfnWebACL.FieldIdentifierProperty
An implementation forCfnWebACL.FieldIdentifierProperty
The part of the web request that you want AWS WAF to inspect.A builder forCfnWebACL.FieldToMatchProperty
An implementation forCfnWebACL.FieldToMatchProperty
The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.A builder forCfnWebACL.ForwardedIPConfigurationProperty
An implementation forCfnWebACL.ForwardedIPConfigurationProperty
A rule statement that labels web requests by country and region and that matches against web requests based on country code.A builder forCfnWebACL.GeoMatchStatementProperty
An implementation forCfnWebACL.GeoMatchStatementProperty
The filter to use to identify the subset of headers to inspect in a web request.A builder forCfnWebACL.HeaderMatchPatternProperty
An implementation forCfnWebACL.HeaderMatchPatternProperty
Inspect all headers in the web request.A builder forCfnWebACL.HeadersProperty
An implementation forCfnWebACL.HeadersProperty
Used for CAPTCHA and challenge token settings.A builder forCfnWebACL.ImmunityTimePropertyProperty
An implementation forCfnWebACL.ImmunityTimePropertyProperty
The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.A builder forCfnWebACL.IPSetForwardedIPConfigurationProperty
An implementation forCfnWebACL.IPSetForwardedIPConfigurationProperty
A rule statement used to detect web requests coming from particular IP addresses or address ranges.A builder forCfnWebACL.IPSetReferenceStatementProperty
An implementation forCfnWebACL.IPSetReferenceStatementProperty
Inspect the body of the web request as JSON.A builder forCfnWebACL.JsonBodyProperty
An implementation forCfnWebACL.JsonBodyProperty
The patterns to look for in the JSON body.A builder forCfnWebACL.JsonMatchPatternProperty
An implementation forCfnWebACL.JsonMatchPatternProperty
A rule statement to match against labels that have been added to the web request by rules that have already run in the web ACL.A builder forCfnWebACL.LabelMatchStatementProperty
An implementation forCfnWebACL.LabelMatchStatementProperty
A single label container.A builder forCfnWebACL.LabelProperty
An implementation forCfnWebACL.LabelProperty
Additional information that's used by a managed rule group.A builder forCfnWebACL.ManagedRuleGroupConfigProperty
An implementation forCfnWebACL.ManagedRuleGroupConfigProperty
A rule statement used to run the rules that are defined in a managed rule group.A builder forCfnWebACL.ManagedRuleGroupStatementProperty
An implementation forCfnWebACL.ManagedRuleGroupStatementProperty
A logical rule statement used to negate the results of another rule statement.A builder forCfnWebACL.NotStatementProperty
An implementation forCfnWebACL.NotStatementProperty
A logical rule statement used to combine other rule statements with OR logic.A builder forCfnWebACL.OrStatementProperty
An implementation forCfnWebACL.OrStatementProperty
The action to use in the place of the action that results from the rule group evaluation.A builder forCfnWebACL.OverrideActionProperty
An implementation forCfnWebACL.OverrideActionProperty
A rate-based rule tracks the rate of requests for each originating IP address, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any 5-minute time span.A builder forCfnWebACL.RateBasedStatementProperty
An implementation forCfnWebACL.RateBasedStatementProperty
A rule statement used to search web request components for a match against a single regular expression.A builder forCfnWebACL.RegexMatchStatementProperty
An implementation forCfnWebACL.RegexMatchStatementProperty
A rule statement used to search web request components for matches with regular expressions.A builder forCfnWebACL.RegexPatternSetReferenceStatementProperty
An implementation forCfnWebACL.RegexPatternSetReferenceStatementProperty
The criteria for inspecting login requests, used by the ATP rule group to validate credentials usage.A builder forCfnWebACL.RequestInspectionProperty
An implementation forCfnWebACL.RequestInspectionProperty
Configures inspection of the response body.A builder forCfnWebACL.ResponseInspectionBodyContainsProperty
An implementation forCfnWebACL.ResponseInspectionBodyContainsProperty
Configures inspection of the response header.A builder forCfnWebACL.ResponseInspectionHeaderProperty
An implementation forCfnWebACL.ResponseInspectionHeaderProperty
Configures inspection of the response JSON.A builder forCfnWebACL.ResponseInspectionJsonProperty
An implementation forCfnWebACL.ResponseInspectionJsonProperty
The criteria for inspecting responses to login requests and account creation requests, used by the ATP and ACFP rule groups to track login and account creation success and failure rates.A builder forCfnWebACL.ResponseInspectionProperty
An implementation forCfnWebACL.ResponseInspectionProperty
Configures inspection of the response status code.A builder forCfnWebACL.ResponseInspectionStatusCodeProperty
An implementation forCfnWebACL.ResponseInspectionStatusCodeProperty
Action setting to use in the place of a rule action that is configured inside the rule group.A builder forCfnWebACL.RuleActionOverrideProperty
An implementation forCfnWebACL.RuleActionOverrideProperty
The action that AWS WAF should take on a web request when it matches a rule's statement.A builder forCfnWebACL.RuleActionProperty
An implementation forCfnWebACL.RuleActionProperty
A rule statement used to run the rules that are defined in aRuleGroup
.A builder forCfnWebACL.RuleGroupReferenceStatementProperty
An implementation forCfnWebACL.RuleGroupReferenceStatementProperty
A single rule, which you can use in aWebACL
orRuleGroup
to identify web requests that you want to allow, block, or count.A builder forCfnWebACL.RuleProperty
An implementation forCfnWebACL.RuleProperty
Inspect one of the headers in the web request, identified by name, for example,User-Agent
orReferer
.A builder forCfnWebACL.SingleHeaderProperty
An implementation forCfnWebACL.SingleHeaderProperty
Inspect one query argument in the web request, identified by name, for example UserName or SalesRegion .A builder forCfnWebACL.SingleQueryArgumentProperty
An implementation forCfnWebACL.SingleQueryArgumentProperty
A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<).A builder forCfnWebACL.SizeConstraintStatementProperty
An implementation forCfnWebACL.SizeConstraintStatementProperty
A rule statement that inspects for malicious SQL code.A builder forCfnWebACL.SqliMatchStatementProperty
An implementation forCfnWebACL.SqliMatchStatementProperty
The processing guidance for a rule, used by AWS WAF to determine whether a web request matches the rule.A builder forCfnWebACL.StatementProperty
An implementation forCfnWebACL.StatementProperty
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.A builder forCfnWebACL.TextTransformationProperty
An implementation forCfnWebACL.TextTransformationProperty
Defines and enables Amazon CloudWatch metrics and web request sample collection.A builder forCfnWebACL.VisibilityConfigProperty
An implementation forCfnWebACL.VisibilityConfigProperty
A rule statement that inspects for cross-site scripting (XSS) attacks.A builder forCfnWebACL.XssMatchStatementProperty
An implementation forCfnWebACL.XssMatchStatementProperty
A CloudFormationAWS::WAFv2::WebACLAssociation
.A fluent builder forCfnWebACLAssociation
.Properties for defining aCfnWebACLAssociation
.A builder forCfnWebACLAssociationProps
An implementation forCfnWebACLAssociationProps
Properties for defining aCfnWebACL
.A builder forCfnWebACLProps
An implementation forCfnWebACLProps