FortiManager icon

FortiManager

Interact with FortiManager API

Firewall → Clone Policy

AI-generated

Summary

Clone a firewall policy from a source policy ID into a new named policy within a specified ADOM and domain.

Inputs

  • domain (required) — API domain (e.g., pm) indicating the FortiManager partition to operate in
  • adom (required) — Administrative Domain name where the policy resides
  • packageName (required) — Name of the policy package to which the cloned policy belongs
  • sourcePolicyId (required) — Numeric ID of the existing policy to clone
  • newPolicyName (required) — Desired name for the newly cloned policy
  • additionalFields — Optional extra fields such as newPolicyId, status, or comments for the cloned policy

Output shape

a list of items representing the result of cloning the policy

Success returns the cloned policy details; errors are thrown and can be handled via continueOnFail

Examples

Example 1: Clone an existing firewall policy into a new package

domain=pm, adom=root, packageName=policy_pkg, sourcePolicyId=123, newPolicyName=clone_123, additionalFields[status]=enable

Example 2: Clone a policy with custom ID and comments

domain=pm, adom=root, packageName=policy_pkg, sourcePolicyId=456, newPolicyName=my_clone, additionalFields[newPolicyId]=789, additionalFields[comments]='Copy of original'

Discussion