update_firewall_policy
Update an existing firewall policy by specifying only the fields to change, leaving others intact. Modify attributes like source/destination interfaces, addresses, services, action, NAT, log traffic, status, or comments.
Instructions
Update an existing firewall policy.
Only the specified fields will be updated; other fields remain unchanged.
Args: adom: ADOM name package: Policy package name policyid: Policy ID to update name: New policy name (optional) srcintf: New source interfaces (optional) dstintf: New destination interfaces (optional) srcaddr: New source addresses (optional) dstaddr: New destination addresses (optional) service: New services (optional) action: New action - "accept" or "deny" (optional) schedule: New schedule (optional) nat: Enable/disable NAT (optional) logtraffic: New log mode (optional) status: New status (optional) comments: New comments (optional) global_label: Policy section label (optional) global_label_color: Policy section color ID 0-31 (optional)
Returns: dict: Update result with keys: - status: "success" or "error" - policyid: Updated policy ID - message: Status or error message
Example: >>> # Disable a policy >>> result = await update_firewall_policy( ... adom="root", ... package="default", ... policyid=10, ... status="disable" ... )
>>> # Update source addresses
>>> result = await update_firewall_policy(
... adom="root",
... package="default",
... policyid=10,
... srcaddr=["New-Subnet", "Other-Subnet"]
... )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adom | Yes | ||
| package | Yes | ||
| policyid | Yes | ||
| name | No | ||
| srcintf | No | ||
| dstintf | No | ||
| srcaddr | No | ||
| dstaddr | No | ||
| service | No | ||
| action | No | ||
| schedule | No | ||
| nat | No | ||
| logtraffic | No | ||
| status | No | ||
| comments | No | ||
| global_label | No | ||
| global_label_color | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||