use of software.amazon.awssdk.services.route53.model.UpdateHealthCheckResponse in project aws-doc-sdk-examples by awsdocs.
the class UpdateHealthCheck method updateSpecificHealthCheck.
// snippet-start:[route53.java2.update_health_check.main]
public static void updateSpecificHealthCheck(Route53Client route53Client, String id) {
try {
UpdateHealthCheckRequest checkRequest = UpdateHealthCheckRequest.builder().healthCheckId(id).disabled(true).build();
// Update the Health Check
UpdateHealthCheckResponse healthResponse = route53Client.updateHealthCheck(checkRequest);
System.out.println("The health check with id " + healthResponse.healthCheck().id() + " was updated!");
} catch (Route53Exception e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
Aggregations