for (String value : lattice.getDimensionValues(dimension)) {
/* Create a zero weighted alias to this set */
String subTreePrefix = dimension.substring(0, Math.min(dimension.length(), 30)) + "-"
+ value.substring(0, Math.min(value.length(), 30));
String subTreeName = subTreePrefix + "." + secondaryName;
AliasTarget target = new AliasTarget();
target.setDNSName(subTreeName);
target.setEvaluateTargetHealth(true);
target.setHostedZoneId(hostedZoneId);
ResourceRecordSet rr = new ResourceRecordSet();
rr.setName(secondaryName);
rr.setWeight(0L);
rr.setType(type);
rr.setAliasTarget(target);
rr.setSetIdentifier(subTreePrefix);
vulcanized.addAll(vulcanize(hostedZoneId, subTreeName, type, ttl,
lattice.simulateFailure(dimension, value).getAllEndpoints(), recordsPerRecordSet));
vulcanized.add(rr);
}
}
/* Add an alias to the secondary level */
AliasTarget target = new AliasTarget();
target.setDNSName(secondaryName);
target.setEvaluateTargetHealth(true);
target.setHostedZoneId(hostedZoneId);
ResourceRecordSet rr = new ResourceRecordSet();
rr.setName(name);
rr.setWeight(0L);
rr.setType(type);
rr.setAliasTarget(target);