Find all the old OPDG connection details

I am new to PowerShell and I am trying to create a PowerShell script.

we have an On-premises data gateway and on that OPDG there are API connection, sftp and ssh connection
are hosted, So we have to find which connection + host name + resource group are their on that
OPDG machine. For all the subscriptions(prod,QA and Dev)

I dont know that you can find all that from the server. If you logon to your power automate, under Data > Connections, you can see what connections you have configured on your gateway.

There might/should be a log on the server that has the info, but ive never checked there. Always checked my flows or connections on power automate.