fadcos_waf_advanced_protection_child_rule – Configure a rule object of an Advanced Protection policy

New in version 1.3.0.

Synopsis

  • Configure a rule object of an Advanced Protection policy

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.8

FortiADC Version Compatibility


v7.1.4 v7.2.2 v7.4.0
fadcos_waf_advanced_protection_child_rule yes yes yes

Parameters

  • action - Type of action to perform on the object. type: str required: true
  • name - Specify the name of the advanced protection policytype: str required: true
  • content_type - Specify a Content Type for the Content Scraping rule from text/html, text/plain, text/xml, application/xml, and application/soap+xml.type: str required: false
  • id - Specify id of the child rule of advanced protection policy.type: str required: false
  • occurrence_limit - Sets the condition for the limit of the number of responses received from the specified type.type: str required: false
  • occurrence_Within - Sets the time span during which to count how many times a response is received from the specified type.type: str required: false
  • percentage_match - Sets the condition for what percentage of the traffic received is from the specified type, during the given time frame.type: str required: false
  • security_action - Select which action profile that you want to apply.type: str required: false
  • severity - Select which severity level FortiADC uses when using Advanced Protection.type: str required: false
  • vdom - VDOM name if enabled.type: str required: true(if VDOM is enabled)

Examples

- name:
  hosts: all
  vars:
  connection: httpapi
  gather_facts: false
  tasks:
    - name: Add WAF advanced protection child rule
      fadcos_waf_advanced_protection_child_rule:
        action: add
        name: AP0
        occurrence_limit: 120
        occurrence_within: 90
        percentage_match: 30
        type: content-scraping

    - name: edit WAF advanced protection child rule
      fadcos_waf_advanced_protection_child_rule:
        action: edit
        name: AP0
        occurrence_limit: 150
        occurrence_within: 100
        percentage_match: 50
        id: 1

    - name: delete WAF advanced_protection
      fadcos_waf_advanced_protection_child_rule:
        action: delete
        name: AP0
        id: 2

Return Values

Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:

  • 200 - OK: Request returns successful.
  • 400 - Bad Request: Request cannot be processed by the API.
  • 401 - Not Authorized: Request without successful login session.
  • 403 - Forbidden: Request is missing CSRF token or administrator is missing access profile permissions.
  • 404 - Resource Not Found: Unable to find the specified resource.
  • 405 - Method Not Allowed: Specified HTTP method is not allowed for this resource.
  • 413 - Request Entity Too Large: Request cannot be processed due to large entity.
  • 424 - Failed Dependency: Fail dependency can be duplicate resource, missing required parameter, missing required attribute, or invalid attribute value.
  • 429 - Access temporarily blocked: Maximum failed authentications reached. The offended source is temporarily blocked for certain amount of time.
  • 500 - Internal Server Error: Internal error when processing the request.

For errorcode please check FortiADC API errorcode at : https://fndn.fortinet.net/index.php?/fortiapi/981-fortiadc/

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Joseph Chen

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.