How to get schedule of AWS retirement instance through Powershell

I have query reg AWS Schedule termination,How to get the info about the termination of instances through Get-ECInstance and event.code - The code for the scheduled event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop)?

How to achieve the script which gives me the report of Scheduled terminate instances through above code criteria?

Regards
Dev