List of usage examples for com.amazonaws.services.route53.model ListHostedZonesByNameRequest setDNSName
public void setDNSName(String dNSName)
(Optional) For your first request to ListHostedZonesByName, include the dnsname parameter only if you want to specify the name of the first hosted zone in the response.
From source file:io.kodokojo.service.aws.Route53DnsManager.java
License:Open Source License
private HostedZone getHostedZone() { ListHostedZonesByNameRequest listHostedZonesByNameRequest = new ListHostedZonesByNameRequest(); listHostedZonesByNameRequest.setDNSName(domainName); ListHostedZonesByNameResult result = client.listHostedZonesByName(listHostedZonesByNameRequest); Iterator<HostedZone> iterator = result.getHostedZones().iterator(); HostedZone hostedZone = null;// www . j a va2s. c o m while (hostedZone == null && iterator.hasNext()) { HostedZone currentZone = iterator.next(); hostedZone = currentZone.getName().equals(domainName) ? currentZone : null; } return hostedZone; }