fadcos_waf_adaptive_learning – Configuring an Adaptive Learning policy¶
New in version 1.3.0.
Parameters¶
- action - Type of action to perform on the object. type: str required: true
- name - Specify the name of the adaptive learning policy.type: str required: true
- fp_threshold - Specify the threshold at which triggered events should be considered a false positive.type: str required: false
- learning_time - The learning time of adaptive learning policy.type: str required: false
- sampling_rate - Specify the percentage of received requests and their responses that will be sampled.type: str required: false
- security_action - Set the action to take after you accept the recommendation for the WAF policy from Adaptive Learning.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 Adaptive Learning Entry
fadcos_waf_adaptive_learning:
action: add
learning_time: 9900
name: al1
- name: Get WAF Adaptive Learning Entry
fadcos_waf_adaptive_learning:
action: get
name: al1
- name: Add WAF another Adaptive Learning Entry
fadcos_waf_adaptive_learning:
action: add
name: al2
security_action: captcha
fp_threshold: 500
learning_time: 12000
sampling_rate: 70
status: enable
- name: Get WAF Adaptive Learning Entry 1
fadcos_waf_adaptive_learning:
action: get
name: al2
- name: Edit WAF Adaptive Learning Entry
fadcos_waf_adaptive_learning:
action: edit
name: al2
sampling_rate: 75
fp_threshold: 2456
learning_time: 11111
security_action: block
status: enable
- name: Get WAF Adaptive Learning Entry 2
fadcos_waf_adaptive_learning:
action: get
name: al2
- name: Get non-existant WAF Adaptive Learning Entry
fadcos_waf_adaptive_learning:
action: get
name: al_none
- name: Delete 1st WAF Adaptive Learning Entry
fadcos_waf_adaptive_learning:
action: delete
name: al1
- name: Delete 2nd WAF Adaptive Learning Entry
fadcos_waf_adaptive_learning:
action: delete
name: al2
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/