Will this power adapter extension cable work for 21.5-inch iMac with Retina 4K display?

Can the iMac's cord plug directly into this or is there a longer cord for the iMac? If so, is there a link for purchase or a part number I can look up with apple?

Power Adapter Extension Cable

Power Adapter Extension Cable

Product No Longer Available

No Answers have been submitted