check_point / check_point.mgmt / 5.2.2 / module / cp_mgmt_add_rules_batch Creates new rules in batch. Use this API to achieve optimum performance when adding more than one rule. | "added in version" 3.0.0 of check_point.mgmt" Authors: Eden Brillant (@chkp-edenbr) preview | supported by communitycheck_point.mgmt.cp_mgmt_add_rules_batch (5.2.2) — module
Install with ansible-galaxy collection install check_point.mgmt:==5.2.2
collections: - name: check_point.mgmt version: 5.2.2
Creates new rules in batch. Use this API to achieve optimum performance when adding more than one rule.
Add multiple rules to a layer in a specific position, incrementing position by one for each rule.
Errors and warnings are ignored when using this API, operation will apply changes while ignoring errors. It is not possible to publish changes that contain validations errors. You must use the "show-validations" API to see any validation errors and warnings caused by the batch creation. Supported rules types are access-rule, nat-rule, https-rule and threat-exception.
This module is not idempotent.
All operations are performed over Web Services API.
- name: add-rules-batch cp_mgmt_add_rules_batch: objects: - first_position: top layer: Network list: - action: accept name: access rule 1 - action: accept name: access rule 2 type: access-rule - first_position: top layer: Standard list: - name: nat rule 1 - name: nat rule 2 type: nat-rule - first_position: top layer: Default Layer list: - name: https rule 1 - name: https rule 2 type: https-rule
objects: description: - Batch of rules separated by types. elements: dict suboptions: first_position: description: - First rule position. type: str layer: description: - Layer name or uid. type: str list: description: - List of rules from the same type to be created on the same layer. <br>Use the "add" API reference documentation for a single rule command to find the expected fields for the request. <br>For example, to add access-rules, use the "add-access-rule" command found in the API reference documentation (under Access Control & NAT). <br>Note, "set-if-exists", "ignore-errors", "ignore-warnings" and "details-level" options are not supported when adding a batch of rules. elements: dict type: list type: description: - Type of rules to be created. <br>Only types from above are supported. type: str type: list version: description: - Version of checkpoint. If not given one, the latest version taken. type: str wait_for_task: default: true description: - Wait for the task to end. Such as publish task. type: bool auto_publish_session: default: false description: - Publish the current session if changes have been performed after task completes. type: bool wait_for_task_timeout: default: 30 description: - How many minutes to wait until throwing a timeout error. type: int
cp_mgmt_add_rules_batch: description: The checkpoint add-rules-batch output. returned: always. type: dict