Class CfnWebACL
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::WAF::WebACL.
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();
-
Nested Class Summary
Nested 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.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
Method Summary
Modifier 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.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.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @NotNull CfnWebACLProps props) Create a newAWS::WAF::WebACL.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDefaultAction
The action to perform if none of theRulescontained in theWebACLmatch.The action is specified by the
WafActionobject. -
setDefaultAction
The action to perform if none of theRulescontained in theWebACLmatch.The action is specified by the
WafActionobject. -
setDefaultAction
The action to perform if none of theRulescontained in theWebACLmatch.The action is specified by the
WafActionobject. -
getMetricName
The name of the metrics for thisWebACL.The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF , including "All" and "Default_Action." You can't change
MetricNameafter you create theWebACL. -
setMetricName
The name of the metrics for thisWebACL.The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF , including "All" and "Default_Action." You can't change
MetricNameafter you create theWebACL. -
getName
A friendly name or description of theWebACL.You can't change the name of a
WebACLafter you create it. -
setName
A friendly name or description of theWebACL.You can't change the name of a
WebACLafter you create it. -
getRules
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. -
setRules
An array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.
-