use of software.amazon.awssdk.services.route53.model.ListHostedZonesResponse in project aws-doc-sdk-examples by awsdocs.
the class ListHostedZones method listZones.
// snippet-start:[route.java2.list_zones.main]
public static void listZones(Route53Client route53Client) {
try {
ListHostedZonesResponse zonesResponse = route53Client.listHostedZones();
List<HostedZone> checklist = zonesResponse.hostedZones();
for (HostedZone check : checklist) {
System.out.println("The name is : " + check.name());
}
} catch (Route53Exception e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
Aggregations