Class CfnWebACL
- All Implemented Interfaces:
IInspectable
,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
Modifier and TypeClassDescriptionstatic interface
Specifies the action AWS WAF takes when a web request matches or doesn't match all rule conditions.static final class
A fluent builder forCfnWebACL
.static interface
A combination ofByteMatchSet
,IPSet
, and/orSqlInjectionMatchSet
objects 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.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnWebACL
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnWebACL
(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 theRules
contained in theWebACL
match.A name for the metrics for thisWebACL
.getName()
A friendly name or description of theWebACL
.getRules()
An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDefaultAction
(IResolvable value) The action to perform if none of theRules
contained in theWebACL
match.void
The action to perform if none of theRules
contained in theWebACL
match.void
setMetricName
(String value) A name for the metrics for thisWebACL
.void
A friendly name or description of theWebACL
.void
An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.void
setRules
(IResolvable value) An array that contains the action for eachRule
in 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, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getDefaultAction
The action to perform if none of theRules
contained in theWebACL
match. -
setDefaultAction
The action to perform if none of theRules
contained in theWebACL
match. -
setDefaultAction
The action to perform if none of theRules
contained in theWebACL
match. -
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 eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
. -
setRules
An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
. -
setRules
An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.
-