use of software.amazon.awssdk.services.route53.model.ListResourceRecordSetsResponse in project aws-doc-sdk-examples by awsdocs.
the class ListResourceRecordSets method listResourceRecord.
// snippet-start:[route.java2.list_records.main]
public static void listResourceRecord(Route53Client route53Client, String hostedZoneId) {
try {
ListResourceRecordSetsRequest request = ListResourceRecordSetsRequest.builder().hostedZoneId(hostedZoneId).maxItems("12").build();
ListResourceRecordSetsResponse listResourceRecordSets = route53Client.listResourceRecordSets(request);
List<ResourceRecordSet> records = listResourceRecordSets.resourceRecordSets();
for (ResourceRecordSet record : records) {
System.out.println("The Record name is: " + record.name());
}
} catch (Route53Exception e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
Aggregations