tldr; Vous devez transmettre un nom de domaine complet comme nom ResourceRecordSet.
J'ai eu ce même problème en utilisant cette instruction c # snip:
private static void RegisterHostWithDns(IAmazonRoute53 ec2,SynoviaImage image)
{
var changeBatch = new ChangeBatch();
var rRs = new ResourceRecordSet(image.Name, RRType.CNAME) {TTL=60,ResourceRecords = new List<ResourceRecord>() { new ResourceRecord(image.PublicDns)} };
var change = new Change(ChangeAction.UPSERT, rRs);
changeBatch.Changes.Add(change);
var request = new ChangeResourceRecordSetsRequest(ConfigurationManager.AppSettings["DnsZoneId"], changeBatch);
var response = ec2.ChangeResourceRecordSets(request);
Console.WriteLine("Updated CNAME For {0} setting {1}",image.Name,image.PublicDns);
}
Dans ce cas image.Name == "Listener"
Une fois que je l'ai changé en:
private static void RegisterHostWithDns(IAmazonRoute53 ec2,SynoviaImage image)
{
var changeBatch = new ChangeBatch();
var rRs = new ResourceRecordSet(string.Format("{0}.{1}",image.Name, "testing.foo.bar.com"), RRType.CNAME) {TTL=60,ResourceRecords = new List<ResourceRecord>() { new ResourceRecord(image.PublicDns)} };
var change = new Change(ChangeAction.UPSERT, rRs);
changeBatch.Changes.Add(change);
var request = new ChangeResourceRecordSetsRequest(ConfigurationManager.AppSettings["DnsZoneId"], changeBatch);
var response = ec2.ChangeResourceRecordSets(request);
Console.WriteLine("Updated CNAME For {0} setting {1}",image.Name,image.PublicDns);
}
maintenant la valeur transmise est: "Listener.fully.qualified.com"
Ça fonctionne maintenant.