switch_resolve_port
Resolve a port number or name to its port details, including PoE and protection status. Type-stable: integers and digit strings are always port numbers.
Instructions
Read-only helper: resolve a port number or PORT_MAP name to {port, name, is_poe, protected, max_port}. Resolution is type-stable: an integer or a string of digits is ALWAYS a port number (never a name), so 3 and "3" mean the same physical port and a numeric name can never shadow one. A non-digit string is a case-insensitive name. UNKNOWN_PORT lists the known names; AMBIGUOUS_NAME if a name maps to more than one port; an out-of-range number is INVALID_PORT. Does not mutate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name_or_port | Yes |