Example usage for com.amazonaws.services.datapipeline.model ListPipelinesResult getPipelineIdList

List of usage examples for com.amazonaws.services.datapipeline.model ListPipelinesResult getPipelineIdList

Introduction

In this page you can find the example usage for com.amazonaws.services.datapipeline.model ListPipelinesResult getPipelineIdList.

Prototype


public java.util.List<PipelineIdName> getPipelineIdList() 

Source Link

Document

The pipeline identifiers.

Usage

From source file:com.shazam.dataengineering.pipelinebuilder.AWSProxy.java

License:Apache License

public String getPipelineId(String nameRegex, String marker) throws DeploymentException {
    try {/*from ww w.j a  v a 2s.  c o m*/
        ListPipelinesRequest request = new ListPipelinesRequest();
        if (marker != null) {
            request.setMarker(marker);
        }

        ListPipelinesResult pipelineList = client.listPipelines(request);
        for (PipelineIdName pipeline : pipelineList.getPipelineIdList()) {
            if (pipeline.getName().matches(nameRegex)) {
                return pipeline.getId();
            }
        }

        if (pipelineList.getHasMoreResults()) {
            return getPipelineId(nameRegex, pipelineList.getMarker());
        } else {
            return "";
        }
    } catch (RuntimeException e) {
        throw new DeploymentException(e);
    }
}