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

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

Introduction

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

Prototype


public HostedZoneConfig getConfig() 

Source Link

Document

A complex type that includes the Comment and PrivateZone elements.

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());
    }//ww  w  .  j a va2 s  .c o  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);/*w  w w  .  j av  a  2  s  .  c  o  m*/
        });
    }
    n.set("aws_nameServers", an);
    return n;

}