Manage VLAN Interface
manage_vlanAdd, remove, enable, or disable RouterOS VLAN interfaces with idempotent name-based handling and dry-run previews to safely automate network changes.
Instructions
Add, remove, enable, or disable a VLAN interface. Idempotent by name: add returns already_exists when a VLAN with matching name, vlan-id, and parent interface exists. Supports dry-run mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mtu | No | MTU size (add only) | |
| name | Yes | VLAN interface name — idempotency key, taken verbatim for remove/enable/disable; add accepts letters, digits, dot, hyphen, underscore, up to 64 chars | |
| action | Yes | Action to perform | |
| dryRun | No | Preview changes without applying. | |
| vlanId | No | VLAN ID (1-4094; required for add) | |
| comment | No | Optional comment (add only) | |
| disabled | No | Whether to create the VLAN disabled (add only) | |
| routerId | No | Router ID; omit to use the default router. | |
| parentInterface | No | Parent interface name (e.g., ether1, bridge1; required for add) | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |