code-dumps/aws/listInstances.sh
2019-01-02 16:38:55 +08:00

5 lines
254 B
Bash
Executable File

#!/usr/bin/env bash
jq -c '.Reservations[].Instances[] | select(.Platform!="windows") | [.InstanceId,.PublicIpAddress,.PrivateIpAddress,(.Tags[] | select(.Key=="Name")| .Value)?, .InstanceType, .Placement.AvailabilityZone, .State.Name]' | tr -d '[["]'