Example usage for com.amazonaws.services.route53.model GetChangeResult getChangeInfo

List of usage examples for com.amazonaws.services.route53.model GetChangeResult getChangeInfo

Introduction

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

Prototype


public ChangeInfo getChangeInfo() 

Source Link

Document

A complex type that contains information about the specified change batch.

Usage

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

License:Apache License

@Override
public String marshall(MarshallStruct<GetChangeResult> input, HttpServletResponse resp) throws Exception {
    GetChangeResult result = input.getMainObject();
    ChangeInfo ci = result.getChangeInfo();
    XMLNode response = new XMLNode(DNS53Constants.GETCHANGERESPONSE);
    response.addAttr(DNS53Constants.XMLNS, DNS53Constants.XMLNS_VALUE);
    if (ci != null) {
        DNS53QueryUtil.marshallChangeInfo(ci, response);
    }/*  w w w.  ja  va2s.  c  o m*/
    return response.toString();
}

From source file:org.ofbiz.tenant.amazonaws.AwsServices.java

License:Apache License

/**
 * get Amazon Rout53 resource record set change
 * @param ctx//from   w ww  .j ava 2 s  .co m
 * @param context
 * @return
 */
public static Map<String, Object> getAmazonRoute53ResourceRecordSetChange(DispatchContext ctx,
        Map<String, Object> context) {
    String changeId = (String) context.get("changeId");

    try {
        AmazonRoute53 route53 = AwsFactory.getAmazonRoute53();
        GetChangeRequest request = new GetChangeRequest(changeId);
        GetChangeResult getChangeResult = route53.getChange(request);
        ChangeInfo changeInfo = getChangeResult.getChangeInfo();
        String status = changeInfo.getStatus();
        Date submittedDate = changeInfo.getSubmittedAt();
        String comment = changeInfo.getComment();
        Map<String, Object> results = ServiceUtil.returnSuccess();
        results.put("changeId", changeId);
        results.put("status", status);
        results.put("submittedDate", submittedDate);
        results.put("comment", comment);
        return results;
    } catch (Exception e) {
        Debug.logError(e, module);
        return ServiceUtil.returnError(e.getMessage());
    }
}