Search in sources :

Example 1 with DeleteHealthCheckRequest

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

the class DeleteHealthCheck method delHealthCheck.

// snippet-start:[route53.java2.delete_health_check.main]
public static void delHealthCheck(Route53Client route53Client, String id) {
    try {
        DeleteHealthCheckRequest delRequest = DeleteHealthCheckRequest.builder().healthCheckId(id).build();
        // Delete the Health Check
        route53Client.deleteHealthCheck(delRequest);
        System.out.println("The hosted zone was deleted");
    } catch (Route53Exception e) {
        System.err.println(e.getMessage());
        System.exit(1);
    }
}
Also used : Route53Exception(software.amazon.awssdk.services.route53.model.Route53Exception) DeleteHealthCheckRequest(software.amazon.awssdk.services.route53.model.DeleteHealthCheckRequest)

Aggregations

DeleteHealthCheckRequest (software.amazon.awssdk.services.route53.model.DeleteHealthCheckRequest)1 Route53Exception (software.amazon.awssdk.services.route53.model.Route53Exception)1