ProtectionRule

class oci.waf.models.ProtectionRule(**kwargs)

Bases: oci.waf.models.web_app_firewall_policy_rule.WebAppFirewallPolicyRule

Rule that represents Request/Response Protection. Only actions of the following types are allowed to be referenced in this rule: * CHECK * RETURN_HTTP_RESPONSE

Attributes

CONDITION_LANGUAGE_JMESPATH str(object=’’) -> str
TYPE_ACCESS_CONTROL str(object=’’) -> str
TYPE_PROTECTION str(object=’’) -> str
TYPE_REQUEST_RATE_LIMITING str(object=’’) -> str
action_name [Required] Gets the action_name of this WebAppFirewallPolicyRule.
condition Gets the condition of this WebAppFirewallPolicyRule.
condition_language Gets the condition_language of this WebAppFirewallPolicyRule.
is_body_inspection_enabled Gets the is_body_inspection_enabled of this ProtectionRule.
name [Required] Gets the name of this WebAppFirewallPolicyRule.
protection_capabilities [Required] Gets the protection_capabilities of this ProtectionRule.
protection_capability_settings Gets the protection_capability_settings of this ProtectionRule.
type [Required] Gets the type of this WebAppFirewallPolicyRule.

Methods

__init__(**kwargs) Initializes a new ProtectionRule object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
CONDITION_LANGUAGE_JMESPATH = 'JMESPATH'
TYPE_ACCESS_CONTROL = 'ACCESS_CONTROL'
TYPE_PROTECTION = 'PROTECTION'
TYPE_REQUEST_RATE_LIMITING = 'REQUEST_RATE_LIMITING'
__init__(**kwargs)

Initializes a new ProtectionRule object with values from keyword arguments. The default value of the type attribute of this class is PROTECTION and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • type (str) – The value to assign to the type property of this ProtectionRule. Allowed values for this property are: “ACCESS_CONTROL”, “PROTECTION”, “REQUEST_RATE_LIMITING”
  • name (str) – The value to assign to the name property of this ProtectionRule.
  • condition_language (str) – The value to assign to the condition_language property of this ProtectionRule. Allowed values for this property are: “JMESPATH”
  • condition (str) – The value to assign to the condition property of this ProtectionRule.
  • action_name (str) – The value to assign to the action_name property of this ProtectionRule.
  • protection_capabilities (list[oci.waf.models.ProtectionCapability]) – The value to assign to the protection_capabilities property of this ProtectionRule.
  • protection_capability_settings (oci.waf.models.ProtectionCapabilitySettings) – The value to assign to the protection_capability_settings property of this ProtectionRule.
  • is_body_inspection_enabled (bool) – The value to assign to the is_body_inspection_enabled property of this ProtectionRule.
action_name

[Required] Gets the action_name of this WebAppFirewallPolicyRule. References action by name from actions defined in WebAppFirewallPolicy.

Returns:The action_name of this WebAppFirewallPolicyRule.
Return type:str
condition

Gets the condition of this WebAppFirewallPolicyRule. An expression that determines whether or not the rule action should be executed.

Returns:The condition of this WebAppFirewallPolicyRule.
Return type:str
condition_language

Gets the condition_language of this WebAppFirewallPolicyRule. The language used to parse condition from field condition. Available languages:

  • JMESPATH an extended JMESPath language syntax.

Allowed values for this property are: “JMESPATH”

Returns:The condition_language of this WebAppFirewallPolicyRule.
Return type:str
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

is_body_inspection_enabled

Gets the is_body_inspection_enabled of this ProtectionRule. Enables/disables body inspection for this protection rule. Only Protection Rules in RequestProtection can have this option enabled. Response body inspection will be available at a later date.

Returns:The is_body_inspection_enabled of this ProtectionRule.
Return type:bool
name

[Required] Gets the name of this WebAppFirewallPolicyRule. Rule name. Must be unique within the module.

Returns:The name of this WebAppFirewallPolicyRule.
Return type:str
protection_capabilities

[Required] Gets the protection_capabilities of this ProtectionRule. An ordered list that references OCI-managed protection capabilities. Referenced protection capabilities are not necessarily executed in order of appearance. Their execution order is decided at runtime for improved performance. The array cannot contain entries with the same pair of capability key and version more than once.

Returns:The protection_capabilities of this ProtectionRule.
Return type:list[oci.waf.models.ProtectionCapability]
protection_capability_settings

Gets the protection_capability_settings of this ProtectionRule.

Returns:The protection_capability_settings of this ProtectionRule.
Return type:oci.waf.models.ProtectionCapabilitySettings
type

[Required] Gets the type of this WebAppFirewallPolicyRule. Type of WebAppFirewallPolicyRule.

Allowed values for this property are: “ACCESS_CONTROL”, “PROTECTION”, “REQUEST_RATE_LIMITING”

Returns:The type of this WebAppFirewallPolicyRule.
Return type:str