FortiManager icon

FortiManager

Interact with FortiManager API

Firewall → Update Policy

AI-generated

Summary

Update firewall policy with new settings

Inputs

  • domain (required) — Domain of FortiManager API to operate on
  • adom (required) — Administrative Domain name
  • packageName (required) — Name of the policy package
  • policyId (required) — ID of the policy to update
  • updateFields — Fields to update in the policy

Output shape

a list of updated policy objects

Each item contains the updated policy details; if an error occurs and continueOnFail is disabled, an error object is returned instead

Examples

Example 1: Update policy ID 42 in ADOM root using package 'policy1'

Set domain='pm', adom='root', packageName='policy1', policyId=42, updateFields with name='NewPolicy', action='accept', status='enable'

Example 2: Modify firewall rule sources and destinations

Set updateFields.srcintf='lan', updateFields.dstintf='wan', updateFields.srcaddr='net1', updateFields.dstaddr='net2', updateFields.action='deny'

Discussion