@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Rule extends Object implements Serializable, Cloneable, StructuredPojo
A combination of ByteMatchSet, IPSet, and/or SqlInjectionMatchSet objects that identify the web
requests that you want to allow, block, or count. For example, you might create a Rule that includes the
following predicates:
An IPSet that causes AWS WAF to search for web requests that originate from the IP address
192.0.2.44
A ByteMatchSet that causes AWS WAF to search for web requests for which the value of the
User-Agent header is BadBot.
To match the settings in this Rule, a request must originate from 192.0.2.44 AND include a
User-Agent header for which the value is BadBot.
| Constructor and Description |
|---|
Rule() |
| Modifier and Type | Method and Description |
|---|---|
Rule |
clone() |
boolean |
equals(Object obj) |
String |
getMetricName()
A friendly name or description for the metrics for this
Rule. |
String |
getName()
The friendly name or description for the
Rule. |
List<Predicate> |
getPredicates()
The
Predicates object contains one Predicate element for each ByteMatchSet,
IPSet, or SqlInjectionMatchSet object that you want to include in a Rule. |
String |
getRuleId()
A unique identifier for a
Rule. |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller. |
void |
setMetricName(String metricName)
A friendly name or description for the metrics for this
Rule. |
void |
setName(String name)
The friendly name or description for the
Rule. |
void |
setPredicates(Collection<Predicate> predicates)
The
Predicates object contains one Predicate element for each ByteMatchSet,
IPSet, or SqlInjectionMatchSet object that you want to include in a Rule. |
void |
setRuleId(String ruleId)
A unique identifier for a
Rule. |
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
Rule |
withMetricName(String metricName)
A friendly name or description for the metrics for this
Rule. |
Rule |
withName(String name)
The friendly name or description for the
Rule. |
Rule |
withPredicates(Collection<Predicate> predicates)
The
Predicates object contains one Predicate element for each ByteMatchSet,
IPSet, or SqlInjectionMatchSet object that you want to include in a Rule. |
Rule |
withPredicates(Predicate... predicates)
The
Predicates object contains one Predicate element for each ByteMatchSet,
IPSet, or SqlInjectionMatchSet object that you want to include in a Rule. |
Rule |
withRuleId(String ruleId)
A unique identifier for a
Rule. |
public void setRuleId(String ruleId)
A unique identifier for a Rule. You use RuleId to get more information about a
Rule (see GetRule), update a Rule (see UpdateRule), insert a
Rule into a WebACL or delete a one from a WebACL (see
UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).
RuleId is returned by CreateRule and by ListRules.
ruleId - A unique identifier for a Rule. You use RuleId to get more information about a
Rule (see GetRule), update a Rule (see UpdateRule), insert a
Rule into a WebACL or delete a one from a WebACL (see
UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).
RuleId is returned by CreateRule and by ListRules.
public String getRuleId()
A unique identifier for a Rule. You use RuleId to get more information about a
Rule (see GetRule), update a Rule (see UpdateRule), insert a
Rule into a WebACL or delete a one from a WebACL (see
UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).
RuleId is returned by CreateRule and by ListRules.
Rule. You use RuleId to get more information about a
Rule (see GetRule), update a Rule (see UpdateRule), insert a
Rule into a WebACL or delete a one from a WebACL (see
UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).
RuleId is returned by CreateRule and by ListRules.
public Rule withRuleId(String ruleId)
A unique identifier for a Rule. You use RuleId to get more information about a
Rule (see GetRule), update a Rule (see UpdateRule), insert a
Rule into a WebACL or delete a one from a WebACL (see
UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).
RuleId is returned by CreateRule and by ListRules.
ruleId - A unique identifier for a Rule. You use RuleId to get more information about a
Rule (see GetRule), update a Rule (see UpdateRule), insert a
Rule into a WebACL or delete a one from a WebACL (see
UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).
RuleId is returned by CreateRule and by ListRules.
public void setName(String name)
The friendly name or description for the Rule. You can't change the name of a Rule
after you create it.
name - The friendly name or description for the Rule. You can't change the name of a
Rule after you create it.public String getName()
The friendly name or description for the Rule. You can't change the name of a Rule
after you create it.
Rule. You can't change the name of a
Rule after you create it.public Rule withName(String name)
The friendly name or description for the Rule. You can't change the name of a Rule
after you create it.
name - The friendly name or description for the Rule. You can't change the name of a
Rule after you create it.public void setMetricName(String metricName)
A friendly name or description for the metrics for this Rule. The name can contain only alphanumeric
characters (A-Z, a-z, 0-9); the name can't contain whitespace. You can't change MetricName after you
create the Rule.
metricName - A friendly name or description for the metrics for this Rule. The name can contain only
alphanumeric characters (A-Z, a-z, 0-9); the name can't contain whitespace. You can't change
MetricName after you create the Rule.public String getMetricName()
A friendly name or description for the metrics for this Rule. The name can contain only alphanumeric
characters (A-Z, a-z, 0-9); the name can't contain whitespace. You can't change MetricName after you
create the Rule.
Rule. The name can contain only
alphanumeric characters (A-Z, a-z, 0-9); the name can't contain whitespace. You can't change
MetricName after you create the Rule.public Rule withMetricName(String metricName)
A friendly name or description for the metrics for this Rule. The name can contain only alphanumeric
characters (A-Z, a-z, 0-9); the name can't contain whitespace. You can't change MetricName after you
create the Rule.
metricName - A friendly name or description for the metrics for this Rule. The name can contain only
alphanumeric characters (A-Z, a-z, 0-9); the name can't contain whitespace. You can't change
MetricName after you create the Rule.public List<Predicate> getPredicates()
The Predicates object contains one Predicate element for each ByteMatchSet,
IPSet, or SqlInjectionMatchSet object that you want to include in a Rule.
Predicates object contains one Predicate element for each
ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to include in a
Rule.public void setPredicates(Collection<Predicate> predicates)
The Predicates object contains one Predicate element for each ByteMatchSet,
IPSet, or SqlInjectionMatchSet object that you want to include in a Rule.
predicates - The Predicates object contains one Predicate element for each
ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to include in a
Rule.public Rule withPredicates(Predicate... predicates)
The Predicates object contains one Predicate element for each ByteMatchSet,
IPSet, or SqlInjectionMatchSet object that you want to include in a Rule.
NOTE: This method appends the values to the existing list (if any). Use
setPredicates(java.util.Collection) or withPredicates(java.util.Collection) if you want to
override the existing values.
predicates - The Predicates object contains one Predicate element for each
ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to include in a
Rule.public Rule withPredicates(Collection<Predicate> predicates)
The Predicates object contains one Predicate element for each ByteMatchSet,
IPSet, or SqlInjectionMatchSet object that you want to include in a Rule.
predicates - The Predicates object contains one Predicate element for each
ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to include in a
Rule.public String toString()
toString in class ObjectObject.toString()public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.