Example usage for com.amazonaws.services.cloudformation AmazonCloudFormationClient describeStackEvents

List of usage examples for com.amazonaws.services.cloudformation AmazonCloudFormationClient describeStackEvents

Introduction

In this page you can find the example usage for com.amazonaws.services.cloudformation AmazonCloudFormationClient describeStackEvents.

Prototype

@Override
public DescribeStackEventsResult describeStackEvents(DescribeStackEventsRequest request) 

Source Link

Document

Returns all stack related events for a specified stack in reverse chronological order.

Usage

From source file:jetbrains.buildServer.runner.cloudformation.AWSClient.java

License:Apache License

public List<String> describeStackEvents(AmazonCloudFormationClient stackbuilder, String stackName,
        String ACTION) {//w ww.  jav a  2s .  c  om
    List<String> output = new ArrayList<String>();
    DescribeStackEventsRequest request = new DescribeStackEventsRequest();
    request.setStackName(stackName);
    DescribeStackEventsResult results = stackbuilder.describeStackEvents(request);
    for (StackEvent event : results.getStackEvents()) {
        if (event.getEventId().contains(ACTION)) {

            output.add(event.getEventId());
            // myListener.debugLog(event.toString());
        }
    }
    return output;
}