The specification is the connector: a NEMA 5-15 straight blade plug, an L5-15 or L6-20 twist-lock, a pigtail with no plug at all, and the wire gauge and conductor count that the fixture and the circuit require. A 18AWG cord on a 20A circuit is not compliant. Length matters less than people expect, but cord sets are sold in standard lengths and cut lengths are not usually returnable.
We stock cord sets, whips, plug-and-cord assemblies and field-installable plugs in the common NEMA configurations.