Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def instanceState(id: String)(implicit c: AWSEC2Client, region: String = null) = {
- for {
- instance <- c.getInstanceServices.describeInstancesInRegion(region, id).headOption
- runningInstance <- instance.headOption
- } yield runningInstance.getInstanceState
- }
Add Comment
Please, Sign In to add comment