/** * <p> * (Optional) The maximum number of hosted zones that you want Amazon Route 53 to return. If you have more than * <code>maxitems</code> hosted zones, the value of <code>IsTruncated</code> in the response is <code>true</code>, * and the value of <code>NextMarker</code> is the hosted zone ID of the first hosted zone that Route 53 will return * if you submit another request. * </p> * * @param maxItems * (Optional) The maximum number of hosted zones that you want Amazon Route 53 to return. If you have more * than <code>maxitems</code> hosted zones, the value of <code>IsTruncated</code> in the response is * <code>true</code>, and the value of <code>NextMarker</code> is the hosted zone ID of the first hosted zone * that Route 53 will return if you submit another request. * @return Returns a reference to this object so that method calls can be chained together. */ public ListHostedZonesRequest withMaxItems(String maxItems) { setMaxItems(maxItems); return this; }
private HostedZone getHostedZone(String domain) { ListHostedZonesRequest listHostedZoneRequest = new ListHostedZonesRequest(); listHostedZoneRequest.setMaxItems(String.valueOf(Integer.MAX_VALUE)); ListHostedZonesResult listHostedZonesResult = amazonRoute53Client.listHostedZones(listHostedZoneRequest); for(HostedZone hostedZone : listHostedZonesResult.getHostedZones()) { if (domain.endsWith(hostedZone.getName())) { return hostedZone; } } return null; }
private HostedZone getHostedZone(String domain) { ListHostedZonesRequest listHostedZoneRequest = new ListHostedZonesRequest(); listHostedZoneRequest.setMaxItems(String.valueOf(Integer.MAX_VALUE)); ListHostedZonesResult listHostedZonesResult = amazonRoute53Client.listHostedZones(listHostedZoneRequest); for(HostedZone hostedZone : listHostedZonesResult.getHostedZones()) { if (domain.endsWith(hostedZone.getName())) { return hostedZone; } } return null; }