-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
46,296 additions
and
12,006 deletions.
There are no files selected for viewing
Submodule aws-sdk-js
updated
672 files
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
function listEC2Instances(region = null) { | ||
var ec2Promise = new AWS.EC2({ | ||
apiVersion: '2016-11-15', | ||
region: region || AWS.config.region, | ||
}) | ||
.describeInstances() | ||
.promise(); | ||
|
||
return ec2Promise | ||
.then((data) => { | ||
return data; | ||
}) | ||
.catch((err) => { | ||
Logger.log(err, err.stack); | ||
return false; | ||
}); | ||
} | ||
|
||
function listSecurityGroups(region = null) { | ||
var ec2Promise = new AWS.EC2({ | ||
apiVersion: '2016-11-15', | ||
region: region || AWS.config.region, | ||
}) | ||
.describeSecurityGroups() | ||
.promise(); | ||
|
||
return ec2Promise | ||
.then((data) => { | ||
return data; | ||
}) | ||
.catch((err) => { | ||
Logger.log(err, err.stack); | ||
return false; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.