Package com.amazonaws.services.route53.model

Examples of com.amazonaws.services.route53.model.ResourceRecordSet


      final String target) {

    final Collection<ResourceRecord> resourceList = new ArrayList<ResourceRecord>();
    resourceList.add(new ResourceRecord(target));

    final ResourceRecordSet record = new ResourceRecordSet();
    record.setName(source);
    record.setTTL(60L);
    record.setType("CNAME");
    record.setResourceRecords(resourceList);

    return record;
  }
View Full Code Here


    Util.assertNotNull(zone, "missing zone for " + source);

    final String zoneId = zone.getId();

    final boolean isPresent;
    final ResourceRecordSet recordOld;
    {
      final ResourceRecordSet recordFound = findRecord(zoneId, source);
      if (recordFound == null) {
        isPresent = false;
        recordOld = makeRecordCNAME(source, target);
      } else {
        isPresent = true;
        recordOld = recordFound;
      }
    }

    final ResourceRecordSet recordNew = makeRecordCNAME(source, target);

    recordNew.setTTL(recordOld.getTTL());

    //

    final Collection<Change> changeList = new LinkedList<Change>();
    if (isPresent) {
View Full Code Here

    /**
     * Look for Existing Resource Record Sets
     */
    {
      ResourceRecordSet resourceRecordSet = null;

      ListResourceRecordSetsResult listResourceRecordSets = ctx.r53
          .listResourceRecordSets(new ListResourceRecordSetsRequest(
              zoneId));

      for (ResourceRecordSet rrs : listResourceRecordSets
          .getResourceRecordSets()) {
        if (!rrs.getName().equals(record))
          continue;

        if (!"A".equals(rrs.getType()))
          continue;

        resourceRecordSet = rrs;
        break;
      }

      if (null != resourceRecordSet) {
        if (getLog().isInfoEnabled())
          getLog().info(format("Excluding resourceRecordSet %s for domain %s", resourceRecordSet, record));
        changeBatch.getChanges().add(new Change(ChangeAction.DELETE,
            resourceRecordSet));
      }
    }

    /**
     * Then Add Ours
     */
    AliasTarget aliasTarget = new AliasTarget();

    aliasTarget.setHostedZoneId(ctx.elbHostedZoneId);
    aliasTarget.setDNSName(curEnv.getEndpointURL());

    ResourceRecordSet resourceRecordSet = new ResourceRecordSet();

    resourceRecordSet.setName(record);
    resourceRecordSet.setType(RRType.A);

    resourceRecordSet.setAliasTarget(aliasTarget);

    if (getLog().isInfoEnabled())
      getLog().info(format("Adding resourceRecordSet %s for domain %s mapped to %s", resourceRecordSet, record, aliasTarget.getDNSName()));

    changeBatch.getChanges().add(new Change(ChangeAction.CREATE, resourceRecordSet));
View Full Code Here

      final String target) {

    final Collection<ResourceRecord> resourceList = new ArrayList<ResourceRecord>();
    resourceList.add(new ResourceRecord(target));

    final ResourceRecordSet record = new ResourceRecordSet();
    record.setName(source);
    record.setTTL(60L);
    record.setType("CNAME");
    record.setResourceRecords(resourceList);

    return record;
  }
View Full Code Here

    assertNotNull(zone, "missing zone for " + source);

    final String zoneId = zone.getId();

    final boolean isPresent;
    final ResourceRecordSet recordOld;
    {
      final ResourceRecordSet recordFound = findRecord(zoneId, source);
      if (recordFound == null) {
        isPresent = false;
        recordOld = makeRecordCNAME(source, target);
      } else {
        isPresent = true;
        recordOld = recordFound;
      }
    }

    final ResourceRecordSet recordNew = makeRecordCNAME(source, target);

    recordNew.setTTL(recordOld.getTTL());

    //

    final Collection<Change> changeList = new LinkedList<Change>();
    if (isPresent) {
View Full Code Here

        // marshaller understands.
        String errorCode = parseErrorCode(node);
        if (errorCode == null || !errorCode.equals("ThrottlingException"))
            return null;

        ThrottlingException e = (ThrottlingException)super.unmarshall(node);
       
        return e;
    }
View Full Code Here

        // marshaller understands.
        String errorCode = parseErrorCode(node);
        if (errorCode == null || !errorCode.equals("TooManyHealthChecks"))
            return null;

        TooManyHealthChecksException e = (TooManyHealthChecksException)super.unmarshall(node);
       
        return e;
    }
View Full Code Here

        // marshaller understands.
        String errorCode = parseErrorCode(node);
        if (errorCode == null || !errorCode.equals("TooManyHealthChecks"))
            return null;

        TooManyHealthChecksException e = (TooManyHealthChecksException)super.unmarshall(node);
       
        return e;
    }
View Full Code Here

        // marshaller understands.
        String errorCode = parseErrorCode(node);
        if (errorCode == null || !errorCode.equals("TooManyHostedZones"))
            return null;

        TooManyHostedZonesException e = (TooManyHostedZonesException)super.unmarshall(node);
       
        return e;
    }
View Full Code Here

        // marshaller understands.
        String errorCode = parseErrorCode(node);
        if (errorCode == null || !errorCode.equals("TooManyHostedZones"))
            return null;

        TooManyHostedZonesException e = (TooManyHostedZonesException)super.unmarshall(node);
       
        return e;
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.route53.model.ResourceRecordSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.