UpCloudLtd / upcloud-cli

UpCloud command line client (upctl)
https://upcloudltd.github.io/upcloud-cli/
MIT License
29 stars 7 forks source link

Add database connection list and database connection cancel commands #142

Closed kangasta closed 2 years ago

kangasta commented 2 years ago

Depends on #139

Example output:

$ upctl database connection list pg-1x1xcpu-2gb-25gb-pl-waw1

 Process ID   State   Application name      Database   Username   Client IP   
──────────── ─────── ───────────────────── ────────── ────────── ─────────────
    3753573   idle    pgAdmin 4 - DB:db_b   db_b       upadmin    1.2.3.4 

$ upctl database connection cancel pg-1x1xcpu-2gb-25gb-pl-waw1 --pid=3753573
Cancelling connection 3753573 to database 094f3c80-b9cf-4cd6-9e2d-5754a83a2026: success          0m2s
kangasta commented 2 years ago

Was planning to merge #143 to master, but forgot to change target. That's why those changes are in this PR.