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()booleanThe action to perform if none of theRulescontained in theWebACLmatch.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 unique identifier for aWebACL.inthashCode()voidsetDefaultAction(WafAction defaultAction) The action to perform if none of theRulescontained in theWebACLmatch.voidsetMetricName(String metricName) voidA friendly name or description of theWebACL.voidsetRules(Collection<ActivatedRule> rules) An array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.voidsetWebACLId(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 theRulescontained in theWebACLmatch.withMetricName(String metricName) A friendly name or description of theWebACL.withRules(ActivatedRule... rules) An array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.withRules(Collection<ActivatedRule> rules) An array that contains the action for eachRulein 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 useWebACLIdto get information about aWebACL(see GetWebACL), update aWebACL(see UpdateWebACL), and delete aWebACLfrom AWS WAF (see DeleteWebACL).WebACLIdis returned by CreateWebACL and by ListWebACLs.- Parameters:
webACLId- A unique identifier for aWebACL. You useWebACLIdto get information about aWebACL(see GetWebACL), update aWebACL(see UpdateWebACL), and delete aWebACLfrom AWS WAF (see DeleteWebACL).WebACLIdis returned by CreateWebACL and by ListWebACLs.
-
getWebACLId
A unique identifier for a
WebACL. You useWebACLIdto get information about aWebACL(see GetWebACL), update aWebACL(see UpdateWebACL), and delete aWebACLfrom AWS WAF (see DeleteWebACL).WebACLIdis returned by CreateWebACL and by ListWebACLs.- Returns:
- A unique identifier for a
WebACL. You useWebACLIdto get information about aWebACL(see GetWebACL), update aWebACL(see UpdateWebACL), and delete aWebACLfrom AWS WAF (see DeleteWebACL).WebACLIdis returned by CreateWebACL and by ListWebACLs.
-
withWebACLId
A unique identifier for a
WebACL. You useWebACLIdto get information about aWebACL(see GetWebACL), update aWebACL(see UpdateWebACL), and delete aWebACLfrom AWS WAF (see DeleteWebACL).WebACLIdis returned by CreateWebACL and by ListWebACLs.- Parameters:
webACLId- A unique identifier for aWebACL. You useWebACLIdto get information about aWebACL(see GetWebACL), update aWebACL(see UpdateWebACL), and delete aWebACLfrom AWS WAF (see DeleteWebACL).WebACLIdis 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 aWebACLafter you create it.- Parameters:
name- A friendly name or description of theWebACL. You can't change the name of aWebACLafter you create it.
-
getName
A friendly name or description of the
WebACL. You can't change the name of aWebACLafter you create it.- Returns:
- A friendly name or description of the
WebACL. You can't change the name of aWebACLafter you create it.
-
withName
A friendly name or description of the
WebACL. You can't change the name of aWebACLafter you create it.- Parameters:
name- A friendly name or description of theWebACL. You can't change the name of aWebACLafter 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
Rulescontained in theWebACLmatch. The action is specified by the WafAction object.- Parameters:
defaultAction- The action to perform if none of theRulescontained in theWebACLmatch. The action is specified by the WafAction object.
-
getDefaultAction
The action to perform if none of the
Rulescontained in theWebACLmatch. The action is specified by the WafAction object.- Returns:
- The action to perform if none of the
Rulescontained in theWebACLmatch. The action is specified by the WafAction object.
-
withDefaultAction
The action to perform if none of the
Rulescontained in theWebACLmatch. The action is specified by the WafAction object.- Parameters:
defaultAction- The action to perform if none of theRulescontained in theWebACLmatch. 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
Rulein aWebACL, the priority of theRule, and the ID of theRule.- Returns:
- An array that contains the action for each
Rulein aWebACL, the priority of theRule, and the ID of theRule.
-
setRules
An array that contains the action for each
Rulein aWebACL, the priority of theRule, and the ID of theRule.- Parameters:
rules- An array that contains the action for eachRulein aWebACL, the priority of theRule, and the ID of theRule.
-
withRules
An array that contains the action for each
Rulein 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 eachRulein 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
Rulein aWebACL, the priority of theRule, and the ID of theRule.- Parameters:
rules- An array that contains the action for eachRulein 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
-