List of usage examples for com.amazonaws.services.opsworks.model DescribeInstancesResult getInstances
public java.util.List<Instance> getInstances()
An array of Instance
objects that describe the instances.
From source file:com.tispr.aws.OpsWorksClient.java
License:Apache License
protected List<String> getInstancesIds(String layerId) { List<String> instanceIds = new ArrayList<String>(); if (layerId == null || layerId.isEmpty()) { return instanceIds; }//from w ww. ja v a 2 s.c o m DescribeInstancesRequest req = new DescribeInstancesRequest().withLayerId(layerId); DescribeInstancesResult res = opsWorksClient.describeInstances(req); for (Instance i : res.getInstances()) { instanceIds.add(i.getInstanceId()); } return instanceIds; }