Class CfnWebACL
- All Implemented Interfaces:
IInspectable,IWebACLRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
This is AWS WAF Classic documentation.
For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF , use the AWS WAF V2 API and see the AWS WAF Developer Guide . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
Contains the Rules that identify the requests that you want to allow, block, or count. In a WebACL , you also specify a default action ( ALLOW or BLOCK ), and the action for each Rule that you add to a WebACL , for example, block requests from specified IP addresses or block requests from specified referrers. If you add more than one Rule to a WebACL , a request needs to match only one of the specifications to be allowed, blocked, or counted.
To identify the requests that you want AWS WAF to filter, you associate the WebACL with an API Gateway API or an Application Load Balancer.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.waf.regional.*;
CfnWebACL cfnWebACL = CfnWebACL.Builder.create(this, "MyCfnWebACL")
.defaultAction(ActionProperty.builder()
.type("type")
.build())
.metricName("metricName")
.name("name")
// the properties below are optional
.rules(List.of(RuleProperty.builder()
.action(ActionProperty.builder()
.type("type")
.build())
.priority(123)
.ruleId("ruleId")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSpecifies the action AWS WAF takes when a web request matches or doesn't match all rule conditions.static final classA fluent builder forCfnWebACL.static interfaceA combination ofByteMatchSet,IPSet, and/orSqlInjectionMatchSetobjects that identify the web requests that you want to allow, block, or count.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.waf.regional.IWebACLRef
IWebACLRef.Jsii$Default, IWebACLRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnWebACL(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnWebACL(software.amazon.jsii.JsiiObjectRef objRef) CfnWebACL(software.constructs.Construct scope, String id, CfnWebACLProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe action to perform if none of theRulescontained in theWebACLmatch.A name for the metrics for thisWebACL.getName()A friendly name or description of theWebACL.getRules()An array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.A reference to a WebACL resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDefaultAction(IResolvable value) The action to perform if none of theRulescontained in theWebACLmatch.voidThe action to perform if none of theRulescontained in theWebACLmatch.voidsetMetricName(String value) A name for the metrics for thisWebACL.voidA friendly name or description of theWebACL.voidAn array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.voidsetRules(IResolvable value) An array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnWebACL
protected CfnWebACL(software.amazon.jsii.JsiiObjectRef objRef) -
CfnWebACL
protected CfnWebACL(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnWebACL
@Stability(Stable) public CfnWebACL(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnWebACLProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getWebAclRef
A reference to a WebACL resource.- Specified by:
getWebAclRefin interfaceIWebACLRef
-
getDefaultAction
The action to perform if none of theRulescontained in theWebACLmatch.Returns union: either
IResolvableorCfnWebACL.ActionProperty -
setDefaultAction
The action to perform if none of theRulescontained in theWebACLmatch. -
setDefaultAction
The action to perform if none of theRulescontained in theWebACLmatch. -
getMetricName
A name for the metrics for thisWebACL. -
setMetricName
A name for the metrics for thisWebACL. -
getName
A friendly name or description of theWebACL. -
setName
A friendly name or description of theWebACL. -
getRules
An array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnWebACL.RuleProperty> -
setRules
An array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule. -
setRules
An array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.
-