get_device_interface_config
Read a device's interface configuration from FortiManager's device DB, filtered by VLAN ID or exact interface name, to map a queried IP or client to its VLAN, interface, and physical port.
Instructions
Read a device's interface CONFIG objects from FortiManager's device DB.
Unlike get_device_interfaces (which proxies the live FortiGate monitor
API and cannot filter by VLAN), this reads the interface configuration
FortiManager keeps in its device database and supports server-side
filtering by VLAN id and/or exact interface name. Use it to map a queried
IP / client to the VLAN, interface and physical port it belongs to.
Args:
device: Managed device name (e.g. "FGT-HQ"). Defaults to DEFAULT_DEVICE
when omitted; required if that is not configured.
vlanids: Optional list of VLAN ids to filter on (matches vlanid in)
name: Optional exact interface name to filter on (e.g. "port1")
Returns: dict with keys: - device - interfaces: raw device-DB interface config (list or dict), credential fields stripped -- see _INTERFACE_SECRET_FIELDS - summary: condensed per-interface list (name/alias/vlanid/ip/...) - interface_count: number of summarized interfaces - error / error_code: on failure
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| device | No | ||
| vlanids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||