update_firewall_policy
Modify an existing firewall policy in FortiManager by specifying ADOM, package, and policy ID. Update only the fields you provide, leaving others unchanged.
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 |
|---|---|---|---|
| nat | No | ||
| adom | Yes | ||
| name | No | ||
| action | No | ||
| status | No | ||
| dstaddr | No | ||
| dstintf | No | ||
| package | Yes | ||
| service | No | ||
| srcaddr | No | ||
| srcintf | No | ||
| comments | No | ||
| policyid | Yes | ||
| schedule | No | ||
| logtraffic | No | ||
| global_label | No | ||
| global_label_color | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||