List of usage examples for com.amazonaws.services.datapipeline.model ValidationError getErrors
public java.util.List<String> getErrors()
A description of the validation error.
From source file:com.shazam.dataengineering.pipelinebuilder.DeploymentAction.java
License:Apache License
private void validateNewPipeline(String pipelineId, DataPipelineClient client) throws DeploymentException { AWSProxy proxy = new AWSProxy(client); ValidatePipelineDefinitionResult validation = proxy.validatePipeline(pipelineId, pipelineObject); List<ValidationError> errors = validation.getValidationErrors(); List<ValidationWarning> warnings = validation.getValidationWarnings(); for (ValidationError error : errors) { for (String errorMessage : error.getErrors()) { clientMessages.add("[ERROR] " + errorMessage); }//from ww w .jav a2 s. c om } for (ValidationWarning warning : warnings) { for (String warningMessage : warning.getWarnings()) { clientMessages.add("[WARN] " + warningMessage); } } if (validation.isErrored()) { clientMessages.add("[ERROR] Critical errors detected in validation."); throw new DeploymentException(); } else { clientMessages.add("[INFO] No critical errors for the pipeline detected in validation."); } }