check_point.mgmt.cp_mgmt_delete_rules_batch (5.2.3) — module

Delete rules in batch from the same layer. Use this API to achieve optimum performance when removing more than one rule.

| "added in version" 3.0.0 of check_point.mgmt"

Authors: Eden Brillant (@chkp-edenbr)

preview | supported by community

Install collection

Install with ansible-galaxy collection install check_point.mgmt:==5.2.3


Add to requirements.yml

  collections:
    - name: check_point.mgmt
      version: 5.2.3

Description

Delete rules in batch from the same layer. Use this API to achieve optimum performance when removing more than one rule.

Warnings are ignored when using this API, operation will apply changes while ignoring warnings.

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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: delete-rules-batch
  cp_mgmt_delete_rules_batch:
    objects:
    - layer: Network
      list:
      - rule_number: 1
      - rule_number: 2
      type: access-rule
    - layer: Standard
      list:
      - rule_number: 1
      - rule_number: 2
      type: nat-rule
    - layer: Default Layer
      list:
      - rule_number: 1
      - rule_number: 2
      type: https-rule

Inputs

    
objects:
    description:
    - Batch of rules separated by types.
    elements: dict
    suboptions:
      layer:
        description:
        - Layer name or uid.
        type: str
      list:
        description:
        - List of rules from the same type to be deleted. <br>Use the "delete" API reference
          documentation for a single rule command to find the expected fields for the
          request.<br>For example, to delete access-rule, use the "delete-access-rule"
          command found in the API reference documentation (under Access Control & NAT).
          <br>Note, "ignore-errors", "ignore-warnings" and "details-level" options are
          not supported when deleting a batch of objects.
        elements: dict
        type: list
      type:
        description:
        - Type of rules to be deleted. <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

Outputs

cp_mgmt_delete_rules_batch:
  description: The checkpoint delete-rules-batch output.
  returned: always.
  type: dict