@Generated(value="OracleSDKGenerator", comments="API Version: 20181116") public final class ProtectionRule extends Object
The protection rule settings. Protection rules can allow, block, or trigger an alert if a request meets the parameters of an applied rule.
Note: Objects should always be created or deserialized using the ProtectionRule.Builder
. This model distinguishes fields
that are null
because they are unset from fields that are explicitly set to null
. This is done in
the setter methods of the ProtectionRule.Builder
, which maintain a set of all explicitly set fields called
__explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take
__explicitlySet__
into account. The constructor, on the other hand, does not set __explicitlySet__
(since the constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
ProtectionRule.Action
The action to take when the traffic is detected as malicious.
|
static class |
ProtectionRule.Builder |
Constructor and Description |
---|
ProtectionRule(String key,
List<String> modSecurityRuleIds,
String name,
String description,
ProtectionRule.Action action,
List<String> labels,
List<ProtectionRuleExclusion> exclusions)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static ProtectionRule.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
Set<String> |
get__explicitlySet__() |
ProtectionRule.Action |
getAction()
The action to take when the traffic is detected as malicious.
|
String |
getDescription()
The description of the protection rule.
|
List<ProtectionRuleExclusion> |
getExclusions() |
String |
getKey()
The unique key of the protection rule.
|
List<String> |
getLabels()
The list of labels for the protection rule.
|
List<String> |
getModSecurityRuleIds()
The list of the ModSecurity rule IDs that apply to this protection rule.
|
String |
getName()
The name of the protection rule.
|
int |
hashCode() |
ProtectionRule.Builder |
toBuilder() |
String |
toString() |
@ConstructorProperties(value={"key","modSecurityRuleIds","name","description","action","labels","exclusions"}) @Deprecated public ProtectionRule(String key, List<String> modSecurityRuleIds, String name, String description, ProtectionRule.Action action, List<String> labels, List<ProtectionRuleExclusion> exclusions)
public static ProtectionRule.Builder builder()
Create a new builder.
public ProtectionRule.Builder toBuilder()
public String getKey()
The unique key of the protection rule.
public List<String> getModSecurityRuleIds()
The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity’s open source WAF rules, see Mod Security’s documentation.
public String getName()
The name of the protection rule.
public String getDescription()
The description of the protection rule.
public ProtectionRule.Action getAction()
The action to take when the traffic is detected as malicious. If unspecified, defaults to OFF
.
public List<String> getLabels()
The list of labels for the protection rule.
*Note:** Protection rules with a `ResponseBody` label will have no effect unless `isResponseInspected` is true.
public List<ProtectionRuleExclusion> getExclusions()
Copyright © 2016–2021. All rights reserved.