Example usage for com.amazonaws.services.route53.model HostedZone getResourceRecordSetCount

List of usage examples for com.amazonaws.services.route53.model HostedZone getResourceRecordSetCount

Introduction

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

Prototype


public Long getResourceRecordSetCount() 

Source Link

Document

The number of resource record sets in the hosted zone.

Usage

From source file:com.msi.dns53.util.DNS53QueryUtil.java

License:Apache License

public static void marshallHostedZone(HostedZone hostedZone, XMLNode response) {
    XMLNode hz = QueryUtil.addNode(response, DNS53Constants.HOSTEDZONE);
    QueryUtil.addNode(hz, DNS53Constants.ID, hostedZone.getId());
    QueryUtil.addNode(hz, DNS53Constants.NAME, hostedZone.getName());
    QueryUtil.addNode(hz, DNS53Constants.CALLERREFERENCE, hostedZone.getCallerReference());
    if (hostedZone.getConfig() != null) {
        XMLNode config = QueryUtil.addNode(hz, DNS53Constants.CONFIG);
        QueryUtil.addNode(config, DNS53Constants.COMMENT, hostedZone.getConfig().getComment());
    }// w  ww.  java  2 s .co m
    QueryUtil.addNode(hz, DNS53Constants.RESOURCERECORDSETCOUNT, hostedZone.getResourceRecordSetCount());
}

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

License:Apache License

ObjectNode toJson(GetHostedZoneResult hzResult) {
    HostedZone hz = hzResult.getHostedZone();

    ObjectNode n = mapper.createObjectNode();
    n.put("aws_account", getAccountId());
    n.put("aws_id", hz.getId());
    n.put("aws_name", hz.getName());
    n.put("aws_callerReference", hz.getCallerReference());
    n.put("aws_resourceRecordSetCount", hz.getResourceRecordSetCount());
    n.put("aws_comment", hz.getConfig().getComment());
    n.put("aws_privateZone", hz.getConfig().getPrivateZone());
    n.put("aws_arn", "arn:aws:route53:::hostedzone/" + hz.getId());

    ArrayNode an = mapper.createArrayNode();
    if (hzResult.getDelegationSet() != null) {
        hzResult.getDelegationSet().getNameServers().forEach(ns -> {
            an.add(ns);/*from  ww w . ja va  2 s . c  o m*/
        });
    }
    n.set("aws_nameServers", an);
    return n;

}