📂 Advanced File Manager
Multi-Root Navigation System
⚡ Quick Jump
Server (/)
Home (/home)
Var_www (/var/www)
Current (/home4/umvavtmy/public_html/website_b18404e2/wp-content/mu-plugins)
📍 Go
⬆ Ke Atas
🏠 Root Server
🏠 Root App
🔄 Refresh
📀 /
›
usr
›
lib
›
python3.9
›
site-packages
›
oci
›
waas
›
models
›
📁 __pycache__
📍
Lokasi:
/usr/lib/python3.9/site-packages/oci/waas/models/__pycache__
💾
Free:
47.2 GB
⚠️ Direktori ini
tidak writable
.
✏️ Mengedit: create_custom_protection_rule_details.cpython-39.opt-1.pyc
a ���fV6 � @ s8 d dl mZmZmZ d dlmZ eG dd� de��ZdS )� )�formatted_flat_dict� NONE_SENTINEL�#value_allowed_none_or_none_sentinel)�init_model_state_from_kwargsc @ s� e Zd ZdZdd� Zedd� �Zejdd� �Zedd� �Zejd d� �Zed d� �Z e jdd� �Z ed d� �Z e jdd� �Z edd� �Zejdd� �Zedd� �Zejdd� �Zdd� Z dd� Zdd� ZdS )�!CreateCustomProtectionRuleDetailsaq The required data to create a custom protection rule. For more information about custom protection rules, see `Custom Protection Rules`__. **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/customprotectionrules.htm c K sP ddddddd�| _ ddddd d d�| _d| _d| _d| _d| _d| _d| _dS )a� Initializes a new CreateCustomProtectionRuleDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): :param compartment_id: The value to assign to the compartment_id property of this CreateCustomProtectionRuleDetails. :type compartment_id: str :param display_name: The value to assign to the display_name property of this CreateCustomProtectionRuleDetails. :type display_name: str :param description: The value to assign to the description property of this CreateCustomProtectionRuleDetails. :type description: str :param template: The value to assign to the template property of this CreateCustomProtectionRuleDetails. :type template: str :param freeform_tags: The value to assign to the freeform_tags property of this CreateCustomProtectionRuleDetails. :type freeform_tags: dict(str, str) :param defined_tags: The value to assign to the defined_tags property of this CreateCustomProtectionRuleDetails. :type defined_tags: dict(str, dict(str, object)) �strzdict(str, str)zdict(str, dict(str, object)))�compartment_id�display_name�description�template� freeform_tags�defined_tagsZ compartmentIdZdisplayNamer r ZfreeformTagsZdefinedTagsN)Z swagger_typesZ attribute_map�_compartment_id� _display_name�_description� _template�_freeform_tags� _defined_tags)�self�kwargs� r �Y/usr/lib/python3.9/site-packages/oci/waas/models/create_custom_protection_rule_details.py�__init__ s( � � z*CreateCustomProtectionRuleDetails.__init__c C s | j S )ar **[Required]** Gets the compartment_id of this CreateCustomProtectionRuleDetails. The `OCID`__ of the compartment in which to create the custom protection rule. __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :return: The compartment_id of this CreateCustomProtectionRuleDetails. :rtype: str �r �r r r r r M s z0CreateCustomProtectionRuleDetails.compartment_idc C s || _ dS )ap Sets the compartment_id of this CreateCustomProtectionRuleDetails. The `OCID`__ of the compartment in which to create the custom protection rule. __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm :param compartment_id: The compartment_id of this CreateCustomProtectionRuleDetails. :type: str Nr )r r r r r r [ s c C s | j S )a **[Required]** Gets the display_name of this CreateCustomProtectionRuleDetails. A user-friendly name for the custom protection rule. :return: The display_name of this CreateCustomProtectionRuleDetails. :rtype: str �r r r r r r i s z.CreateCustomProtectionRuleDetails.display_namec C s || _ dS )z� Sets the display_name of this CreateCustomProtectionRuleDetails. A user-friendly name for the custom protection rule. :param display_name: The display_name of this CreateCustomProtectionRuleDetails. :type: str Nr )r r r r r r u s c C s | j S )z� Gets the description of this CreateCustomProtectionRuleDetails. A description for the Custom Protection rule. :return: The description of this CreateCustomProtectionRuleDetails. :rtype: str �r r r r r r � s z-CreateCustomProtectionRuleDetails.descriptionc C s || _ dS )z� Sets the description of this CreateCustomProtectionRuleDetails. A description for the Custom Protection rule. :param description: The description of this CreateCustomProtectionRuleDetails. :type: str Nr )r r r r r r � s c C s | j S )a� **[Required]** Gets the template of this CreateCustomProtectionRuleDetails. The template text of the custom protection rule. All custom protection rules are expressed in ModSecurity Rule Language. Additionally, each rule must include two placeholder variables that are updated by the WAF service upon publication of the rule. `id: {{id_1}}` - This field is populated with a unique rule ID generated by the WAF service which identifies a `SecRule`. More than one `SecRule` can be defined in the `template` field of a CreateCustomSecurityRule call. The value of the first `SecRule` must be `id: {{id_1}}` and the `id` field of each subsequent `SecRule` should increase by one, as shown in the example. `ctl:ruleEngine={{mode}}` - The action to be taken when the criteria of the `SecRule` are met, either `OFF`, `DETECT` or `BLOCK`. This field is automatically populated with the corresponding value of the `action` field of the `CustomProtectionRuleSetting` schema when the `WafConfig` is updated. *Example:* ``` SecRule REQUEST_COOKIES "regex matching SQL injection - part 1/2" \ "phase:2, \ msg:'Detects chained SQL injection attempts 1/2.', \ id: {{id_1}}, \ ctl:ruleEngine={{mode}}, \ deny" SecRule REQUEST_COOKIES "regex matching SQL injection - part 2/2" \ "phase:2, \ msg:'Detects chained SQL injection attempts 2/2.', \ id: {{id_2}}, \ ctl:ruleEngine={{mode}}, \ deny" ``` The example contains two `SecRules` each having distinct regex expression to match the `Cookie` header value during the second input analysis phase. For more information about custom protection rules, see `Custom Protection Rules`__. For more information about ModSecurity syntax, see `Making Rules: The Basic Syntax`__. For more information about ModSecurity's open source WAF rules, see `Mod Security's OWASP Core Rule Set documentation`__. __ https://docs.cloud.oracle.com/Content/WAF/Tasks/customprotectionrules.htm __ https://www.modsecurity.org/CRS/Documentation/making.html __ https://www.modsecurity.org/CRS/Documentation/index.html :return: The template of this CreateCustomProtectionRuleDetails. :rtype: str �r r r r r r � s -z*CreateCustomProtectionRuleDetails.templatec C s || _ dS )a� Sets the template of this CreateCustomProtectionRuleDetails. The template text of the custom protection rule. All custom protection rules are expressed in ModSecurity Rule Language. Additionally, each rule must include two placeholder variables that are updated by the WAF service upon publication of the rule. `id: {{id_1}}` - This field is populated with a unique rule ID generated by the WAF service which identifies a `SecRule`. More than one `SecRule` can be defined in the `template` field of a CreateCustomSecurityRule call. The value of the first `SecRule` must be `id: {{id_1}}` and the `id` field of each subsequent `SecRule` should increase by one, as shown in the example. `ctl:ruleEngine={{mode}}` - The action to be taken when the criteria of the `SecRule` are met, either `OFF`, `DETECT` or `BLOCK`. This field is automatically populated with the corresponding value of the `action` field of the `CustomProtectionRuleSetting` schema when the `WafConfig` is updated. *Example:* ``` SecRule REQUEST_COOKIES "regex matching SQL injection - part 1/2" \ "phase:2, \ msg:'Detects chained SQL injection attempts 1/2.', \ id: {{id_1}}, \ ctl:ruleEngine={{mode}}, \ deny" SecRule REQUEST_COOKIES "regex matching SQL injection - part 2/2" \ "phase:2, \ msg:'Detects chained SQL injection attempts 2/2.', \ id: {{id_2}}, \ ctl:ruleEngine={{mode}}, \ deny" ``` The example contains two `SecRules` each having distinct regex expression to match the `Cookie` header value during the second input analysis phase. For more information about custom protection rules, see `Custom Protection Rules`__. For more information about ModSecurity syntax, see `Making Rules: The Basic Syntax`__. For more information about ModSecurity's open source WAF rules, see `Mod Security's OWASP Core Rule Set documentation`__. __ https://docs.cloud.oracle.com/Content/WAF/Tasks/customprotectionrules.htm __ https://www.modsecurity.org/CRS/Documentation/making.html __ https://www.modsecurity.org/CRS/Documentation/index.html :param template: The template of this CreateCustomProtectionRuleDetails. :type: str Nr )r r r r r r � s -c C s | j S )a� Gets the freeform_tags of this CreateCustomProtectionRuleDetails. Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__. Example: `{"Department": "Finance"}` __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm :return: The freeform_tags of this CreateCustomProtectionRuleDetails. :rtype: dict(str, str) �r r r r r r � s z/CreateCustomProtectionRuleDetails.freeform_tagsc C s || _ dS )a Sets the freeform_tags of this CreateCustomProtectionRuleDetails. Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__. Example: `{"Department": "Finance"}` __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm :param freeform_tags: The freeform_tags of this CreateCustomProtectionRuleDetails. :type: dict(str, str) Nr )r r r r r r s c C s | j S )a� Gets the defined_tags of this CreateCustomProtectionRuleDetails. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__. Example: `{"Operations": {"CostCenter": "42"}}` __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm :return: The defined_tags of this CreateCustomProtectionRuleDetails. :rtype: dict(str, dict(str, object)) �r r r r r r s z.CreateCustomProtectionRuleDetails.defined_tagsc C s || _ dS )a� Sets the defined_tags of this CreateCustomProtectionRuleDetails. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__. Example: `{"Operations": {"CostCenter": "42"}}` __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm :param defined_tags: The defined_tags of this CreateCustomProtectionRuleDetails. :type: dict(str, dict(str, object)) Nr )r r r r r r * s c C s t | �S �N)r r r r r �__repr__; s z*CreateCustomProtectionRuleDetails.__repr__c C s |d u rdS | j |j kS )NF)�__dict__�r �otherr r r �__eq__> s z(CreateCustomProtectionRuleDetails.__eq__c C s | |k S r r r# r r r �__ne__D s z(CreateCustomProtectionRuleDetails.__ne__N)�__name__� __module__�__qualname__�__doc__r �propertyr �setterr r r r r r! r% r&