set_config
Validate and preview FortiGate configuration changes before applying them; update, create, or delete endpoints with schema-checked fields and dry-run output.
Instructions
Change any configuration endpoint, validated against the FortiGate's schema first: field names, option values, integer ranges, string lengths, and table vs single-object rules. action is update (default), create or delete. With dry_run (the default) nothing is sent; the result shows the request and each field's current and new value. Fields that reference other objects take a list of names, e.g. srcaddr: ['LAB-NET'].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mkey | No | Entry key; required to update or delete a table entry | |
| vdom | No | VDOM (default: FORTIGATE_VDOM, usually root) | |
| action | No | update, create or delete (default update) | |
| fields | No | Field values, using the schema's hyphenated names | |
| dry_run | No | Only validate and show the change (default true) | |
| endpoint | Yes | e.g. log/setting, firewall/local-in-policy |