use of software.amazon.awssdk.services.route53.model.DeleteHostedZoneRequest in project aws-doc-sdk-examples by awsdocs.
the class DeleteHostedZone method delHostedZone.
// snippet-start:[route53.java2.delete_hosted_zone.main]
public static void delHostedZone(Route53Client route53Client, String hostedZoneId) {
try {
DeleteHostedZoneRequest deleteHostedZoneRequestRequest = DeleteHostedZoneRequest.builder().id(hostedZoneId).build();
route53Client.deleteHostedZone(deleteHostedZoneRequestRequest);
System.out.println("The hosted zone was deleted");
} catch (Route53Exception e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
Aggregations