use of com.amazonaws.services.route53.model.GetChangeResult in project Synapse-Stack-Builder by Sage-Bionetworks.
the class Route53Setup method setupResources.
public void setupResources() throws InterruptedException {
List<Change> changes = buildChangesList(Constants.ROUTE53_PREFIXES);
if (changes.size() > 0) {
ChangeBatch changeBatch = new ChangeBatch().withChanges(changes);
ChangeResourceRecordSetsRequest cReq = new ChangeResourceRecordSetsRequest().withHostedZoneId(hostedZone.getId()).withChangeBatch(changeBatch);
ChangeResourceRecordSetsResult cRes = route53Client.changeResourceRecordSets(cReq);
GetChangeRequest gcReq = new GetChangeRequest(cRes.getChangeInfo().getId());
GetChangeResult gcRes = route53Client.getChange(gcReq);
// TODO: No real need to wait here, could just exit
while (!"INSYNC".equals(gcRes.getChangeInfo().getStatus())) {
Thread.sleep(1000L);
gcRes = route53Client.getChange(gcReq);
String s = gcRes.getChangeInfo().getStatus();
}
}
}
Aggregations