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. You also associate the WebACL with a Amazon CloudFront distribution to identify the requests that you want AWS WAF to filter. 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.
 
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.*;
 CfnWebACL cfnWebACL = CfnWebACL.Builder.create(this, "MyCfnWebACL")
         .defaultAction(WafActionProperty.builder()
                 .type("type")
                 .build())
         .metricName("metricName")
         .name("name")
         // the properties below are optional
         .rules(List.of(ActivatedRuleProperty.builder()
                 .priority(123)
                 .ruleId("ruleId")
                 // the properties below are optional
                 .action(WafActionProperty.builder()
                         .type("type")
                         .build())
                 .build()))
         .build();
 - See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceTheActivatedRuleobject in anUpdateWebACLrequest specifies aRulethat you want to insert or delete, the priority of theRulein theWebACL, and the action that you want AWS WAF to take when a web request matches theRule(ALLOW,BLOCK, orCOUNT).static final classA fluent builder forCfnWebACL.static interfaceNested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectableIInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.waf.IWebACLRefIWebACLRef.Jsii$Default, IWebACLRef.Jsii$Proxy
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedCfnWebACL(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnWebACL(software.amazon.jsii.JsiiObjectRef objRef) CfnWebACL(software.constructs.Construct scope, String id, CfnWebACLProps props) 
- 
Method SummaryModifier and TypeMethodDescriptionThe action to perform if none of theRulescontained in theWebACLmatch.The name of 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) The name of 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.CfnResourceaddDeletionOverride, 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.CfnRefElementgetRefMethods inherited from class software.amazon.awscdk.CfnElementgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.ConstructgetNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstructgetNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
CFN_RESOURCE_TYPE_NAMEThe CloudFormation resource type name for this resource class.
 
- 
- 
Constructor Details- 
CfnWebACLprotected CfnWebACL(software.amazon.jsii.JsiiObjectRef objRef) 
- 
CfnWebACLprotected 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- 
inspectExamines the CloudFormation resource and discloses attributes.- Specified by:
- inspectin interface- IInspectable
- 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 class- CfnResource
- Parameters:
- props- This parameter is required.
 
- 
getAttrId
- 
getCfnProperties- Overrides:
- getCfnPropertiesin class- CfnResource
 
- 
getWebAclRefA reference to a WebACL resource.- Specified by:
- getWebAclRefin interface- IWebACLRef
 
- 
getDefaultActionThe action to perform if none of theRulescontained in theWebACLmatch.Returns union: either IResolvableorCfnWebACL.WafActionProperty
- 
setDefaultActionThe action to perform if none of theRulescontained in theWebACLmatch.
- 
setDefaultActionThe action to perform if none of theRulescontained in theWebACLmatch.
- 
getMetricNameThe name of the metrics for thisWebACL.
- 
setMetricNameThe name of the metrics for thisWebACL.
- 
getNameA friendly name or description of theWebACL.
- 
setNameA friendly name or description of theWebACL.
- 
getRulesAn array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.Returns union: either IResolvableor Listinvalid input: '<'eitherIResolvableorCfnWebACL.ActivatedRuleProperty>
- 
setRulesAn array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.
- 
setRulesAn array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.
 
-