Search in sources :

Example 1 with ListStackInstancesRequest

use of com.amazonaws.services.cloudformation.model.ListStackInstancesRequest in project pipeline-aws-plugin by jenkinsci.

the class CloudFormationStackSet method findStackSetInstances.

public List<StackInstanceSummary> findStackSetInstances() {
    List<StackInstanceSummary> summaries = new ArrayList<>();
    ListStackInstancesRequest request = new ListStackInstancesRequest().withStackSetName(this.stackSet);
    do {
        ListStackInstancesResult result = this.client.listStackInstances(request);
        request.setNextToken(result.getNextToken());
        summaries.addAll(result.getSummaries());
    } while (request.getNextToken() != null);
    return summaries;
}
Also used : ListStackInstancesRequest(com.amazonaws.services.cloudformation.model.ListStackInstancesRequest) StackInstanceSummary(com.amazonaws.services.cloudformation.model.StackInstanceSummary) ArrayList(java.util.ArrayList) ListStackInstancesResult(com.amazonaws.services.cloudformation.model.ListStackInstancesResult)

Aggregations

ListStackInstancesRequest (com.amazonaws.services.cloudformation.model.ListStackInstancesRequest)1 ListStackInstancesResult (com.amazonaws.services.cloudformation.model.ListStackInstancesResult)1 StackInstanceSummary (com.amazonaws.services.cloudformation.model.StackInstanceSummary)1 ArrayList (java.util.ArrayList)1