@Generated(value="OracleSDKGenerator", comments="API Version: 20181116") public final class ProtectionRule extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
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 ProtectionRule.Builder.__explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take the explicitly set
fields into account. The constructor, on the other hand, does not take the explicitly set fields
into account (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 |
EXPLICITLY_SET_FILTER_NAME, EXPLICITLY_SET_PROPERTY_NAME
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) |
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() |
String |
toString(boolean includeByteArrayContents)
Return a string representation of the object.
|
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated @ConstructorProperties(value={"key","modSecurityRuleIds","name","description","action","labels","exclusions"}) 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()
public String toString()
toString
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
public int hashCode()
hashCode
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
Copyright © 2016–2024. All rights reserved.