Retrieve a list of your instances mapped to their current status (Running, Stopped, etc...)
How it works:
- Sends an API call to Get All Instances
- Filters through the JSON response and finds .instances.hostName and maps that to .instances.status
- You now have a list of your instances mapped to their current status ("Running", "Stopped", etc...)
Example Usage + Output:
Note: similar to polling the health API, you can wrap the code in a try-except block + take input for the appliance URL + API key (hardcoding these is never a good practice for security). You can also copy the polling logic from the repo linked ^