Example usage for com.amazonaws.services.route53.model ListHostedZonesResult getMarker

List of usage examples for com.amazonaws.services.route53.model ListHostedZonesResult getMarker

Introduction

In this page you can find the example usage for com.amazonaws.services.route53.model ListHostedZonesResult getMarker.

Prototype


public String getMarker() 

Source Link

Document

For the second and subsequent calls to ListHostedZones, Marker is the value that you specified for the marker parameter in the request that produced the current response.

Usage

From source file:com.msi.dns53.server.query.ListHostedZones.java

License:Apache License

@Override
public String marshall(MarshallStruct<ListHostedZonesResult> input, HttpServletResponse resp) throws Exception {
    logger.debug("Marshalling the result into xml.");
    ListHostedZonesResult result = input.getMainObject();
    XMLNode response = new XMLNode(DNS53Constants.LISTHOSTEDZONESRESPONSE);
    response.addAttr(DNS53Constants.XMLNS, DNS53Constants.XMLNS_VALUE);
    if (result.getHostedZones() != null && result.getHostedZones().size() > 0) {
        XMLNode hzs = QueryUtil.addNode(response, DNS53Constants.HOSTEDZONES);
        for (HostedZone hostedZone : result.getHostedZones()) {
            DNS53QueryUtil.marshallHostedZone(hostedZone, hzs);
        }/*from  ww w.jav a2  s  .co m*/
    }
    QueryUtil.addNode(response, DNS53Constants.MARKER, result.getMarker());
    QueryUtil.addNode(response, DNS53Constants.ISTRUNCATED, result.getIsTruncated());
    QueryUtil.addNode(response, DNS53Constants.NEXTMARKER, result.getNextMarker());
    QueryUtil.addNode(response, DNS53Constants.MAXITEMS, result.getMaxItems());
    logger.debug("Returning the response xml to AbstractHeaderAction.");
    return response.toString();
}

From source file:org.lendingclub.mercator.aws.Route53Scanner.java

License:Apache License

@Override
protected void doScan() {

    ListHostedZonesRequest request = new ListHostedZonesRequest();
    ListHostedZonesResult result = new ListHostedZonesResult();

    do {//from w  w  w  . j  av  a 2s  . c  om
        result = getClient().listHostedZones(request);
        for (HostedZone zone : result.getHostedZones()) {
            scanHostedZoneById(zone.getId());
        }
        request.setMarker(result.getMarker());
    } while (result.isTruncated());

}