Example usage for com.amazonaws.services.route53.model HealthCheck getHealthCheckConfig

List of usage examples for com.amazonaws.services.route53.model HealthCheck getHealthCheckConfig

Introduction

In this page you can find the example usage for com.amazonaws.services.route53.model HealthCheck getHealthCheckConfig.

Prototype


public HealthCheckConfig getHealthCheckConfig() 

Source Link

Document

A complex type that contains detailed information about one health check.

Usage

From source file:com.deploymentio.ec2namer.helpers.DnsRegistrar.java

License:Apache License

protected void deleteHealthChecks(NamerRequest req, LambdaContext context) {
    String marker = null;/* w  ww . j av a 2 s .c o m*/
    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));
}