Search in sources :

Example 1 with DescribeChangeSetRequest

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

the class EventPrinter method waitAndPrintChangeSetEvents.

public void waitAndPrintChangeSetEvents(String stack, String changeSet, Waiter<DescribeChangeSetRequest> waiter, long pollIntervalMillis) throws ExecutionException {
    final BasicFuture<AmazonWebServiceRequest> waitResult = new BasicFuture<>(null);
    waiter.runAsync(new WaiterParameters<>(new DescribeChangeSetRequest().withStackName(stack).withChangeSetName(changeSet)), new WaiterHandler() {

        @Override
        public void onWaitSuccess(AmazonWebServiceRequest request) {
            waitResult.completed(request);
        }

        @Override
        public void onWaitFailure(Exception e) {
            waitResult.failed(e);
        }
    });
    this.waitAndPrintEvents(stack, pollIntervalMillis, waitResult);
}
Also used : BasicFuture(org.apache.http.concurrent.BasicFuture) DescribeChangeSetRequest(com.amazonaws.services.cloudformation.model.DescribeChangeSetRequest) AmazonWebServiceRequest(com.amazonaws.AmazonWebServiceRequest) WaiterHandler(com.amazonaws.waiters.WaiterHandler) ExecutionException(java.util.concurrent.ExecutionException) AmazonCloudFormationException(com.amazonaws.services.cloudformation.model.AmazonCloudFormationException)

Aggregations

AmazonWebServiceRequest (com.amazonaws.AmazonWebServiceRequest)1 AmazonCloudFormationException (com.amazonaws.services.cloudformation.model.AmazonCloudFormationException)1 DescribeChangeSetRequest (com.amazonaws.services.cloudformation.model.DescribeChangeSetRequest)1 WaiterHandler (com.amazonaws.waiters.WaiterHandler)1 ExecutionException (java.util.concurrent.ExecutionException)1 BasicFuture (org.apache.http.concurrent.BasicFuture)1