3

我正在使用通过 Amazon 推荐的 dnscurl.pl,以便从 route53 中删除记录集。我遇到了一个我无法弄清楚的错误。Route53 响应错误:InvalidInput。消息:无效的 XML;cvc-elt.1:找不到元素“ChangeResourceRecordSetsRequest”的声明。

    <ErrorResponse xmlns="https://route53.amazonaws.com/doc/2012-02-29/">
      <Error><Type>Sender</Type><Code>InvalidInput</Code>
        <Message>Invalid XML ; cvc-elt.1: Cannot find the declaration of element 'ChangeResourceRecordSetsRequest'.</Message>
      </Error><RequestId>51c5c1de-c246-11e2-b977-934c36c18aa7</RequestId>        
    </ErrorResponse>

我的要求如下:

    dnscurl.pl --keyname my_key_name -- -s -H "Content-Type: text/xml; charset=UTF-8" -X POST --upload-file /tmp/tmp.qEYXdPVpFh https://route53.amazonaws.com/2012-02-29/hostedzone/xxxxxxxxxx/rrset

正在使用的 xml 文件是:

    <?xml version="1.0" encoding="UTF-8"?>
      <ChangeResourceRecordSetsRequest xmlns="https://route53.amazonaws.com/doc/2012-12-12">
        <ChangeBatch>
          <Comment>Deleting Record for staging.mysite.com. at Tue May 21 17:37:52 UTC 2013</Comment>
          <Changes>
            <Change><Action>DELETE</Action><ResourceRecordSet><Name>staging.mysite.com.</Name><Type>A</Type><AliasTarget><HostedZoneId>xxxxxxxxxx</HostedZoneId><DNSName>awseb-e-s-awsebloa-xxxxxxxx-xxxxxxx.us-east-1.elb.amazonaws.com.</DNSName></AliasTarget></ResourceRecordSet></Change>

            <Change><Action>DELETE</Action><ResourceRecordSet><Name>ec2.staging.mysite.com.</Name><Type>CNAME</Type><TTL>300</TTL><ResourceRecords><ResourceRecord><Value>ec2-xx.xx.xx.xx.compute-1.amazonaws.com</Value></ResourceRecord></ResourceRecords></ResourceRecordSet></Change>
    </Changes>
</ChangeBatch>

我找不到任何有关 XML 为什么无效的信息。它检查所有 XML 验证器。关于去哪里的任何想法?

谢谢!

4

2 回答 2

0

尝试改变这个:

<ChangeResourceRecordSetsRequest xmlns="https://route53.amazonaws.com/doc/2012-12-12">

对此:

<ChangeResourceRecordSetsRequest xmlns="https://route53.amazonaws.com/doc/2012-12-12/">
于 2013-08-23T16:14:07.000 回答
0

我注意到您没有关闭:

</ChangeResourceRecordSetsRequest>
于 2013-10-02T21:19:06.213 回答