List of usage examples for com.amazonaws SdkBaseException SdkBaseException
public SdkBaseException(Throwable t)
From source file:tech.greenfield.aws.route53.EventHandler.java
License:Open Source License
private void rebuildAllRRs(String asgName) { List<Instance> instances = Tools.getASGInstances(asgName).stream() .filter(i -> i.getHealthStatus().equals("Healthy")).map(Tools::asInstanceToEC2) .filter(Objects::nonNull).collect(Collectors.toList()); ChangeBatch changes = instances.isEmpty() ? message.getDeleteChanges() : message.getUpsertChanges(instances); if (Route53Message.isDebug()) logger.info("Sending DNS change request: " + changes); try {//from ww w .j a va2 s. co m ChangeResourceRecordSetsRequest req = new ChangeResourceRecordSetsRequest( Route53Message.getHostedZoneId(), changes); Tools.waitFor(route53().changeResourceRecordSets(req)); } catch (IllegalArgumentException e) { Tools.logException(logger, "Error in submitting Route53 update", e); throw new SdkBaseException(e); } }