Class WebACL
- All Implemented Interfaces:
Serializable
,Cloneable
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 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.
For more information, see UpdateWebACL.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The action to perform if none of theRules
contained in theWebACL
match.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
.A unique identifier for aWebACL
.int
hashCode()
void
setDefaultAction
(WafAction defaultAction) The action to perform if none of theRules
contained in theWebACL
match.void
setMetricName
(String metricName) void
A friendly name or description of theWebACL
.void
setRules
(Collection<ActivatedRule> rules) An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.void
setWebACLId
(String webACLId) A unique identifier for aWebACL
.toString()
Returns a string representation of this object; useful for testing and debugging.withDefaultAction
(WafAction defaultAction) The action to perform if none of theRules
contained in theWebACL
match.withMetricName
(String metricName) A friendly name or description of theWebACL
.withRules
(ActivatedRule... rules) An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.withRules
(Collection<ActivatedRule> rules) An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.withWebACLId
(String webACLId) A unique identifier for aWebACL
.
-
Constructor Details
-
WebACL
public WebACL()
-
-
Method Details
-
setWebACLId
A unique identifier for a
WebACL
. You useWebACLId
to get information about aWebACL
(see GetWebACL), update aWebACL
(see UpdateWebACL), and delete aWebACL
from AWS WAF (see DeleteWebACL).WebACLId
is returned by CreateWebACL and by ListWebACLs.- Parameters:
webACLId
- A unique identifier for aWebACL
. You useWebACLId
to get information about aWebACL
(see GetWebACL), update aWebACL
(see UpdateWebACL), and delete aWebACL
from AWS WAF (see DeleteWebACL).WebACLId
is returned by CreateWebACL and by ListWebACLs.
-
getWebACLId
A unique identifier for a
WebACL
. You useWebACLId
to get information about aWebACL
(see GetWebACL), update aWebACL
(see UpdateWebACL), and delete aWebACL
from AWS WAF (see DeleteWebACL).WebACLId
is returned by CreateWebACL and by ListWebACLs.- Returns:
- A unique identifier for a
WebACL
. You useWebACLId
to get information about aWebACL
(see GetWebACL), update aWebACL
(see UpdateWebACL), and delete aWebACL
from AWS WAF (see DeleteWebACL).WebACLId
is returned by CreateWebACL and by ListWebACLs.
-
withWebACLId
A unique identifier for a
WebACL
. You useWebACLId
to get information about aWebACL
(see GetWebACL), update aWebACL
(see UpdateWebACL), and delete aWebACL
from AWS WAF (see DeleteWebACL).WebACLId
is returned by CreateWebACL and by ListWebACLs.- Parameters:
webACLId
- A unique identifier for aWebACL
. You useWebACLId
to get information about aWebACL
(see GetWebACL), update aWebACL
(see UpdateWebACL), and delete aWebACL
from AWS WAF (see DeleteWebACL).WebACLId
is returned by CreateWebACL and by ListWebACLs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setName
A friendly name or description of the
WebACL
. You can't change the name of aWebACL
after you create it.- Parameters:
name
- A friendly name or description of theWebACL
. You can't change the name of aWebACL
after you create it.
-
getName
A friendly name or description of the
WebACL
. You can't change the name of aWebACL
after you create it.- Returns:
- A friendly name or description of the
WebACL
. You can't change the name of aWebACL
after you create it.
-
withName
A friendly name or description of the
WebACL
. You can't change the name of aWebACL
after you create it.- Parameters:
name
- A friendly name or description of theWebACL
. You can't change the name of aWebACL
after you create it.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMetricName
- Parameters:
metricName
-
-
getMetricName
- Returns:
-
withMetricName
- Parameters:
metricName
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDefaultAction
The action to perform if none of the
Rules
contained in theWebACL
match. The action is specified by the WafAction object.- Parameters:
defaultAction
- The action to perform if none of theRules
contained in theWebACL
match. The action is specified by the WafAction object.
-
getDefaultAction
The action to perform if none of the
Rules
contained in theWebACL
match. The action is specified by the WafAction object.- Returns:
- The action to perform if none of the
Rules
contained in theWebACL
match. The action is specified by the WafAction object.
-
withDefaultAction
The action to perform if none of the
Rules
contained in theWebACL
match. The action is specified by the WafAction object.- Parameters:
defaultAction
- The action to perform if none of theRules
contained in theWebACL
match. The action is specified by the WafAction object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getRules
An array that contains the action for each
Rule
in aWebACL
, the priority of theRule
, and the ID of theRule
.- Returns:
- An array that contains the action for each
Rule
in aWebACL
, the priority of theRule
, and the ID of theRule
.
-
setRules
An array that contains the action for each
Rule
in aWebACL
, the priority of theRule
, and the ID of theRule
.- Parameters:
rules
- An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.
-
withRules
An array that contains the action for each
Rule
in aWebACL
, the priority of theRule
, and the ID of theRule
.NOTE: This method appends the values to the existing list (if any). Use
setRules(java.util.Collection)
orwithRules(java.util.Collection)
if you want to override the existing values.- Parameters:
rules
- An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withRules
An array that contains the action for each
Rule
in aWebACL
, the priority of theRule
, and the ID of theRule
.- Parameters:
rules
- An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-