Skip to content
v2.275.0

AWS Web Application Firewall Construct Library ​

This module is part of the AWS Cloud Development Kit project.

ts
import * as waf from 'aws-cdk-lib/aws-waf';
python
import aws_cdk.aws_waf as waf
java
import software.amazon.awscdk.services.waf.*;
csharp
using Amazon.CDK.AWS.WAF;
go
import waf "github.com/aws/aws-cdk-go/awscdk"

There are no official hand-written (L2) constructs for this service yet. Here are some suggestions on how to proceed:

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::WAF.

(Read the CDK Contributing Guide and submit an RFC if you are interested in contributing to this construct library.)

Types ​

NameKindSummary
CfnByteMatchSetConstruct (L1)> This is AWS WAF Classic documentation.
CfnIPSetConstruct (L1)> AWS WAF Classic support will end on September 30, 2025.
CfnRuleConstruct (L1)> This is AWS WAF Classic documentation.
CfnSizeConstraintSetConstruct (L1)> AWS WAF Classic support will end on September 30, 2025.
CfnSqlInjectionMatchSetConstruct (L1)> AWS WAF Classic support will end on September 30, 2025.
CfnWebACLConstruct (L1)> This is AWS WAF Classic documentation.
CfnXssMatchSetConstruct (L1)> AWS WAF Classic support will end on September 30, 2025.
CfnByteMatchSet.ByteMatchTuplePropertyStruct> AWS WAF Classic support will end on September 30, 2025.
CfnByteMatchSet.FieldToMatchPropertyStruct> AWS WAF Classic support will end on September 30, 2025.
CfnByteMatchSetPropsStructProperties for defining a CfnByteMatchSet.
CfnIPSet.IPSetDescriptorPropertyStruct> AWS WAF Classic support will end on September 30, 2025.
CfnIPSetPropsStructProperties for defining a CfnIPSet.
CfnRule.PredicatePropertyStructSpecifies the ByteMatchSet , IPSet , SqlInjectionMatchSet , XssMatchSet , RegexMatchSet , GeoMatchSet , and SizeConstraintSet objects that you want to add to a Rule and, for each object, indicates whether you want to negate the settings, for example, requests that do NOT originate from the IP address 192.0.2.44.
CfnRulePropsStructProperties for defining a CfnRule.
CfnSizeConstraintSet.FieldToMatchPropertyStructThe part of a web request that you want to inspect, such as a specified header or a query string.
CfnSizeConstraintSet.SizeConstraintPropertyStruct> AWS WAF Classic support will end on September 30, 2025.
CfnSizeConstraintSetPropsStructProperties for defining a CfnSizeConstraintSet.
CfnSqlInjectionMatchSet.FieldToMatchPropertyStructThe part of a web request that you want to inspect, such as a specified header or a query string.
CfnSqlInjectionMatchSet.SqlInjectionMatchTuplePropertyStruct> AWS WAF Classic support will end on September 30, 2025.
CfnSqlInjectionMatchSetPropsStructProperties for defining a CfnSqlInjectionMatchSet.
CfnWebACL.ActivatedRulePropertyStructThe ActivatedRule object in an UpdateWebACL request specifies a Rule that you want to insert or delete, the priority of the Rule in the WebACL , and the action that you want AWS WAF to take when a web request matches the Rule ( ALLOW , BLOCK , or COUNT ).
CfnWebACL.WafActionPropertyStruct> AWS WAF Classic support will end on September 30, 2025.
CfnWebACLPropsStructProperties for defining a CfnWebACL.
CfnXssMatchSet.FieldToMatchPropertyStructThe part of a web request that you want to inspect, such as a specified header or a query string.
CfnXssMatchSet.XssMatchTuplePropertyStruct> AWS WAF Classic support will end on September 30, 2025.
CfnXssMatchSetPropsStructProperties for defining a CfnXssMatchSet.