:source: fortiswitch_system_automation_action.py
:orphan:
.. fortiswitch_system_automation_action:
fortiswitch_system_automation_action -- Action for automation stitches in Fortinet's FortiSwitch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module is able to configure a FortiSwitch device by allowing the user to set and modify system feature and automation_action category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v7.0.0
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible>=2.16
FortiSwitch Version Compatibility
---------------------------------
.. raw:: html
| Supported Version Ranges |
| fortiswitch_system_automation_action |
v7.2.1 -> 7.4.3 |
Parameters
----------
.. raw:: html
- enable_log - Enable/Disable logging for task. type: bool required: false default: False
- member_path - Member attribute path to operate on. type: str
- member_state - Add or delete a member under specified attribute path. type: str choices: present, absent
- state - Indicates whether to create or remove the object. type: str required: true choices: present, absent
- system_automation_action - Action for automation stitches. type: dict
- accprofile - Access profile for CLI script action to access FortiSwitch features. type: str
- action_type - Action type. type: str choices: email, alert, cli-script, snmp-trap, webhook
- alicloud_access_key_id - AliCloud AccessKey ID. type: str
- alicloud_access_key_secret - AliCloud AccessKey secret. type: str
- alicloud_account_id - AliCloud account ID. type: str
- alicloud_function - AliCloud function name. type: str
- alicloud_function_authorization - AliCloud function authorization type. type: str choices: anonymous, function
- alicloud_function_domain - AliCloud function domain. type: str
- alicloud_region - AliCloud region. type: str
- alicloud_service - AliCloud service name. type: str
- alicloud_version - AliCloud version. type: str
- aws_api_id - AWS API Gateway ID. type: str
- aws_api_key - AWS API Gateway API key. type: str
- aws_api_path - AWS API Gateway path. type: str
- aws_api_stage - AWS API Gateway deployment stage name. type: str
- aws_domain - AWS domain. type: str
- aws_region - AWS region. type: str
- azure_api_key - Azure function API key. type: str
- azure_app - Azure function application name. type: str
- azure_domain - Azure function domain. type: str
- azure_function - Azure function name. type: str
- azure_function_authorization - Azure function authorization level. type: str choices: anonymous, function, admin
- email_body - Email body. type: str
- email_from - Email sender name. type: str
- email_subject - Email subject. type: str
- email_to - Email addresses. type: list
- name - Email address. type: str
- gcp_function - Google Cloud function name. type: str
- gcp_function_domain - Google Cloud function domain. type: str
- gcp_function_region - Google Cloud function region. type: str
- gcp_project - Google Cloud Platform project name. type: str
- headers - Request headers. type: list
- header - Request header. type: str
- http_body - Request body (if necessary). Should be serialized json string. type: str
- method - Request method (POST, PUT, GET, PATCH or DELETE). type: str choices: post, put, get, patch, delete
- minimum_interval - Limit execution to no more than once in this interval (in seconds). type: int
- name - Name. type: str required: true
- port - Protocol port. type: int
- protocol - Request protocol. type: str choices: http, https
- script - CLI script. type: str
- snmp_trap - SNMP trap. type: str choices: cpu-high, mem-low, syslog-full, test-trap, fsStitchTrap1, fsStitchTrap2, fsStitchTrap3, fsStitchTrap4, fsStitchTrap5
- uri - Request API URI. type: str
Examples
--------
.. code-block:: yaml+jinja
- name: Action for automation stitches.
fortinet.fortiswitch.fortiswitch_system_automation_action:
state: "present"
system_automation_action:
accprofile: " (source system.accprofile.name)"
action_type: "email"
alicloud_access_key_id: ""
alicloud_access_key_secret: ""
alicloud_account_id: ""
alicloud_function: ""
alicloud_function_authorization: "anonymous"
alicloud_function_domain: ""
alicloud_region: ""
alicloud_service: ""
alicloud_version: ""
aws_api_id: ""
aws_api_key: ""
aws_api_path: ""
aws_api_stage: ""
aws_domain: ""
aws_region: ""
azure_api_key: ""
azure_app: ""
azure_domain: ""
azure_function: ""
azure_function_authorization: "anonymous"
email_body: ""
email_from: ""
email_subject: ""
email_to:
-
name: "default_name_29"
gcp_function: ""
gcp_function_domain: ""
gcp_function_region: ""
gcp_project: ""
headers:
-
header: ""
http_body: ""
method: "post"
minimum_interval: "1296000"
name: "default_name_39"
port: "32767"
protocol: "http"
script: ""
snmp_trap: "cpu-high"
uri: ""
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:
.. raw:: html
- build - Build number of the fortiSwitch image returned: always type: str sample: 1547
- http_method - Last method used to provision the content into FortiSwitch returned: always type: str sample: PUT
- http_status - Last result given by FortiSwitch on last operation applied returned: always type: str sample: 200
- mkey - Master key (id) used in the last call to FortiSwitch returned: success type: str sample: id
- name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
- path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
- serial - Serial number of the unit returned: always type: str sample: FS1D243Z13000122
- status - Indication of the operation's result returned: always type: str sample: success
- version - Version of the FortiSwitch returned: always type: str sample: v7.0.0
Status
------
- This module is not guaranteed to have a backwards compatible interface.
Authors
-------
- Link Zheng (@chillancezen)
- Jie Xue (@JieX19)
- Hongbin Lu (@fgtdev-hblu)
- Frank Shen (@frankshen01)
- Miguel Angel Munoz (@mamunozgonzalez)
.. hint::
If you notice any issues in this documentation, feel free to create a pull request to improve it.