create_port_profile
create_port_profile
Section titled “create_port_profile”Create a switch port profile.
Side effects:
- Adds a new profile defining native (untagged) VLAN, tagged VLANs,
PoE behaviour, and forwarding mode. The profile is dormant until
a switch port is assigned to it (via
set_port_state). - Mutates controller state. Use dry_run=True to preview the change without applying.
Example
Section titled “Example”create_port_profile(name="iot-trunk", native_networkconf_id="65f...", tagged_networkconf_ids=["65a...", "65b..."], poe_mode="auto")Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | yes | — | Display name for the profile (e.g. "iot-trunk"). |
native_networkconf_id | string | no | "" | _id of the native (untagged) network. Empty for trunk-only ports. |
forward | string | no | ”all” | "all" (default), "native", "customize", or "disabled". |
poe_mode | string | no | ”auto” | "auto" (default), "passive24v", "passthrough", or "off". |
tagged_networkconf_ids | `array | null` | no | null |
controller | string | no | ”default” | Name of the UniFi controller to target. Defaults to "default". |
dry_run | boolean | no | false | Preview the change without applying it. Returns the predicted change set. |