Search in sources :

Example 1 with ListHealthChecksResponse

use of software.amazon.awssdk.services.route53.model.ListHealthChecksResponse in project aws-doc-sdk-examples by awsdocs.

the class ListHealthChecks method listAllHealthChecks.

// snippet-start:[route53.java2.list_health_checks.main]
public static void listAllHealthChecks(Route53Client route53Client) {
    try {
        ListHealthChecksResponse checksResponse = route53Client.listHealthChecks();
        List<HealthCheck> checklist = checksResponse.healthChecks();
        for (HealthCheck check : checklist) {
            System.out.println("The health check id is: " + check.id());
            System.out.println("The health threshold is: " + check.healthCheckConfig().healthThreshold());
            System.out.println("The type is: " + check.healthCheckConfig().typeAsString());
        }
    } catch (Route53Exception e) {
        System.err.println(e.getMessage());
        System.exit(1);
    }
}
Also used : Route53Exception(software.amazon.awssdk.services.route53.model.Route53Exception) HealthCheck(software.amazon.awssdk.services.route53.model.HealthCheck) ListHealthChecksResponse(software.amazon.awssdk.services.route53.model.ListHealthChecksResponse)

Aggregations

HealthCheck (software.amazon.awssdk.services.route53.model.HealthCheck)1 ListHealthChecksResponse (software.amazon.awssdk.services.route53.model.ListHealthChecksResponse)1 Route53Exception (software.amazon.awssdk.services.route53.model.Route53Exception)1