figaro
figaro

Reputation: 2325

Controlling multiple amazon EC2 instances

Which class/method to use to start/stop a List of amazon EC2 instances with java API? I only know the List<Instance>

Upvotes: 0

Views: 148

Answers (1)

Joe
Joe

Reputation: 42627

startInstances takes a StartInstancesRequest, which has a method .setInstanceIds that allows you to attach a list of instance IDs.

http://docs.amazonwebservices.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ec2/AmazonEC2.html#startInstances%28com.amazonaws.services.ec2.model.StartInstancesRequest%29

Upvotes: 1

Related Questions