Creating hosted zone records with .NET SDK

0

I am trying to create hosted zone records (alias, Simple routing, A records) using the .NET SDK ChangeResourceRecordSetsAsync method. My jsonized input for the request (sanitized) is this:

{
  "HostedZoneId": "route 53 hosted zone id",
  "ChangeBatch": {
    "Changes": [
      {
        "Action": {
          "Value": "CREATE"
        },
        "ResourceRecordSet": {
          "Name": "uri that i wish this to appear as",
          "Type": {
            "Value": "A"
          },
          "Region": {
            "Value": "selected region"
          },
          "AliasTarget": {
            "HostedZoneId": "hosted zone id of the api gateway endpoint",
            "DNSName": "api gateway domain name",
            "EvaluateTargetHealth": true
          },
        }
      }
    ]
  }
}

If I include SetIdentifier, I end up with a hosted zone record, but the routing is set to Latency. If I remove SetIdentifier, it complains because it is not there and nothing gets created. Could someone please help me format a request to create a record with Simple routing?

1 Antwort
0
Akzeptierte Antwort

Alright, figured it out. I had to remove the Region from the request.

lxman
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen