List of usage examples for com.amazonaws.services.datapipeline.model ValidatePipelineDefinitionResult isErrored
public Boolean isErrored()
Indicates whether there were validation errors.
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); }// w w w . j a va2s . c o m } 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."); } }