Package com.oracle.bmc.waas.model
Class ProtectionRule.Builder
- java.lang.Object
-
- com.oracle.bmc.waas.model.ProtectionRule.Builder
-
- Enclosing class:
- ProtectionRule
public static class ProtectionRule.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProtectionRule.Builder
action(ProtectionRule.Action action)
The action to take when the traffic is detected as malicious.ProtectionRule
build()
ProtectionRule.Builder
copy(ProtectionRule model)
ProtectionRule.Builder
description(String description)
The description of the protection rule.ProtectionRule.Builder
exclusions(List<ProtectionRuleExclusion> exclusions)
ProtectionRule.Builder
key(String key)
The unique key of the protection rule.ProtectionRule.Builder
labels(List<String> labels)
The list of labels for the protection rule.ProtectionRule.Builder
modSecurityRuleIds(List<String> modSecurityRuleIds)
The list of the ModSecurity rule IDs that apply to this protection rule.ProtectionRule.Builder
name(String name)
The name of the protection rule.
-
-
-
Method Detail
-
key
public ProtectionRule.Builder key(String key)
The unique key of the protection rule.- Parameters:
key
- the value to set- Returns:
- this builder
-
modSecurityRuleIds
public ProtectionRule.Builder modSecurityRuleIds(List<String> modSecurityRuleIds)
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.
- Parameters:
modSecurityRuleIds
- the value to set- Returns:
- this builder
-
name
public ProtectionRule.Builder name(String name)
The name of the protection rule.- Parameters:
name
- the value to set- Returns:
- this builder
-
description
public ProtectionRule.Builder description(String description)
The description of the protection rule.- Parameters:
description
- the value to set- Returns:
- this builder
-
action
public ProtectionRule.Builder action(ProtectionRule.Action action)
The action to take when the traffic is detected as malicious.If unspecified, defaults to OFF.
- Parameters:
action
- the value to set- Returns:
- this builder
-
labels
public ProtectionRule.Builder labels(List<String> labels)
The list of labels for the protection rule.*Note:** Protection rules with a ResponseBody label will have no effect unless isResponseInspected is true.
- Parameters:
labels
- the value to set- Returns:
- this builder
-
exclusions
public ProtectionRule.Builder exclusions(List<ProtectionRuleExclusion> exclusions)
-
build
public ProtectionRule build()
-
copy
public ProtectionRule.Builder copy(ProtectionRule model)
-
-