1
0
Fork 0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-11-14 17:02:43 +00:00
cloudkeys-go/vendor/github.com/aws/aws-sdk-go/example/service/ec2/instancesbyRegion
Martin Thielecke 9c6e3c89a5 JS bugfixes (#18)
* fix js scoping issue

* add external libraries (they were offline too often)

* new compiled scripts and css

* new fixes in the binary

* vendor update

* change js source

* remove needless variable

* removed more needless variables
2019-01-21 15:27:20 +01:00
..
instancesByRegion.go JS bugfixes (#18) 2019-01-21 15:27:20 +01:00
README.md JS bugfixes (#18) 2019-01-21 15:27:20 +01:00

Example Fetch By region

This is an example using the AWS SDK for Go to list ec2 instances instance state By different region . By default it fetch all running and stopped instance

Usage

# To fetch the stopped and running instances of all region use below:
./filter_ec2_by_region --state running --state stopped

# To fetch the stopped and running instances for region us-west-1 and eu-west-1 use below:
./filter_ec2_by_region --state running --state stopped --region us-west-1 --region=eu-west-1

Sample Output

Fetching instace details  for region: ap-south-1 with criteria:  [running][stopped]**
 printing instance details.....
instance id i-************
current State stopped
done for region ap-south-1 ****



Fetching instace details  for region: eu-west-2 with criteria:  [running][stopped]**
 There is no instance for the for region eu-west-2 with the matching Criteria: [running][stopped]
done for region eu-west-2 ****