List of usage examples for com.amazonaws.services.route53.model HealthCheck getCallerReference
public String getCallerReference()
A unique string that you specified when you created the health check.
From source file:com.deploymentio.ec2namer.helpers.DnsRegistrar.java
License:Apache License
protected void deleteHealthChecks(NamerRequest req, LambdaContext context) { String marker = null;/* www. j a v a 2 s .com*/ do { ListHealthChecksResult result = route53 .listHealthChecks(new ListHealthChecksRequest().withMarker(marker)); for (HealthCheck hc : result.getHealthChecks()) { if (hc.getCallerReference().startsWith(req.getInstanceId())) { String hcId = hc.getId(); route53.deleteHealthCheck(new DeleteHealthCheckRequest().withHealthCheckId(hcId)); context.log("Deleted health-check: Id=" + hcId + " FQDN=" + hc.getHealthCheckConfig().getFullyQualifiedDomainName()); } } } while (!StringUtils.isEmpty(marker)); }