fmgr_pkg_header_shapingpolicy – Configure shaping policies.¶
New in version 2.10.
Synopsis¶
- This module is able to configure a FortiManager device.
- Examples include all parameters and values need to be adjusted to data sources before usage.
Requirements¶
The below requirements are needed on the host that executes this module.
- ansible>=2.9.0
FortiManager Version Compatibility¶
6.0.0 |
6.2.1 |
6.2.3 |
6.2.5 |
6.4.0 |
6.4.2 |
6.4.5 |
7.0.0 |
7.2.0 |
|
| pkg_header_shapingpolicy | yes | yes | yes | yes | yes | yes | yes | yes | yes |
Parameters¶
- enable_log - Enable/Disable logging for task type: bool required: false default: False
- forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0 type: str required: false
- proposed_method - The overridden method for the underlying Json RPC request type: str required: false choices: set, update, add
- bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters type: bool required: false default: False
- workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode type: str required: false choices: global, custom adom including root
- workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock type: integer required: false default: 300
- rc_succeeded - The rc codes list with which the conditions to succeed will be overriden type: list required: false
- rc_failed - The rc codes list with which the conditions to fail will be overriden type: list required: false
- state - The directive to create, update or delete an object type: str required: true choices: present, absent
- pkg - The parameter in requested url type: str required: true
- pkg_header_shapingpolicy - no description type: dict
- app-category - No description for the parameter type: str more...
- app-group - No description for the parameter type: str more...
- application - No description for the parameter type: int more...
- class-id - No description for the parameter type: int more...
- comment - No description for the parameter type: str more...
- diffserv-forward - No description for the parameter type: str choices: [disable, enable] more...
- diffserv-reverse - No description for the parameter type: str choices: [disable, enable] more...
- diffservcode-forward - No description for the parameter type: str more...
- diffservcode-rev - No description for the parameter type: str more...
- dstaddr - No description for the parameter type: str more...
- dstaddr6 - No description for the parameter type: str more...
- dstintf - No description for the parameter type: str more...
- groups - No description for the parameter type: str more...
- id - No description for the parameter type: int more...
- internet-service - No description for the parameter type: str choices: [disable, enable] more...
- internet-service-custom - No description for the parameter type: str more...
- internet-service-custom-group - No description for the parameter type: str more...
- internet-service-group - No description for the parameter type: str more...
- internet-service-id - No description for the parameter type: str more...
- internet-service-src - No description for the parameter type: str choices: [disable, enable] more...
- internet-service-src-custom - No description for the parameter type: str more...
- internet-service-src-custom-group - No description for the parameter type: str more...
- internet-service-src-group - No description for the parameter type: str more...
- internet-service-src-id - No description for the parameter type: str more...
- ip-version - No description for the parameter type: str choices: [4, 6] more...
- per-ip-shaper - No description for the parameter type: str more...
- schedule - No description for the parameter type: str more...
- service - No description for the parameter type: str more...
- srcaddr - No description for the parameter type: str more...
- srcaddr6 - No description for the parameter type: str more...
- srcintf - No description for the parameter type: str more...
- status - No description for the parameter type: str choices: [disable, enable] more...
- tos - No description for the parameter type: str more...
- tos-mask - No description for the parameter type: str more...
- tos-negate - No description for the parameter type: str choices: [disable, enable] more...
- traffic-shaper - No description for the parameter type: str more...
- traffic-shaper-reverse - No description for the parameter type: str more...
- url-category - No description for the parameter type: str more...
- users - No description for the parameter type: str more...
- uuid - No description for the parameter type: str more...
- internet-service-name - No description for the parameter type: str more...
- internet-service-src-name - No description for the parameter type: str more...
- class-id-reverse - No description for the parameter type: int more...
- service-type - No description for the parameter type: str choices: [service, internet-service] more...
Notes¶
Note
- Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
- To create or update an object, use state: present directive.
- To delete an object, use state: absent directive
- Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded
Examples¶
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: no description
fmgr_pkg_header_shapingpolicy:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
pkg: <your own value>
state: <value in [present, absent]>
pkg_header_shapingpolicy:
app-category: <value of string>
app-group: <value of string>
application: <value of integer>
class-id: <value of integer>
comment: <value of string>
diffserv-forward: <value in [disable, enable]>
diffserv-reverse: <value in [disable, enable]>
diffservcode-forward: <value of string>
diffservcode-rev: <value of string>
dstaddr: <value of string>
dstaddr6: <value of string>
dstintf: <value of string>
groups: <value of string>
id: <value of integer>
internet-service: <value in [disable, enable]>
internet-service-custom: <value of string>
internet-service-custom-group: <value of string>
internet-service-group: <value of string>
internet-service-id: <value of string>
internet-service-src: <value in [disable, enable]>
internet-service-src-custom: <value of string>
internet-service-src-custom-group: <value of string>
internet-service-src-group: <value of string>
internet-service-src-id: <value of string>
ip-version: <value in [4, 6]>
per-ip-shaper: <value of string>
schedule: <value of string>
service: <value of string>
srcaddr: <value of string>
srcaddr6: <value of string>
srcintf: <value of string>
status: <value in [disable, enable]>
tos: <value of string>
tos-mask: <value of string>
tos-negate: <value in [disable, enable]>
traffic-shaper: <value of string>
traffic-shaper-reverse: <value of string>
url-category: <value of string>
users: <value of string>
uuid: <value of string>
internet-service-name: <value of string>
internet-service-src-name: <value of string>
class-id-reverse: <value of integer>
service-type: <value in [service, internet-service]>
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:
- request_url - The full url requested returned: always type: str sample: /sys/login/user
- response_code - The status of api request returned: always type: int sample: 0
- response_message - The descriptive message of the api response returned: always type: str sample: OK
- response_data - The data body of the api response returned: optional type: list or dict