我正在尝试为托管区域创建记录集:
var params = {
ChangeBatch: {
Changes: [
{
Action: 'UPSERT',
ResourceRecordSet: {
Name: 'google5.com', //Domain name
Type: 'A',
ResourceRecords: [{
'Value': '52.255.255.255' //Instance Public IP
}]
}
}
]
},
HostedZoneId: '/hostedzone/Z0.....' //Hosted Zone ID
}
route53.changeResourceRecordSets(params, function(err, data) {
console.log(err);
});
我不断收到错误消息:
InvalidInput: Invalid request
最佳答案
我发现添加了正常工作的完整示例之后,TTL属性丢失了:
var params = {
ChangeBatch: {
Changes: [
{
Action: 'UPSERT',
ResourceRecordSet: {
Name: 'google5.com', //Domain name
Type: 'A',
TTL: 86400, //Critical!
ResourceRecords: [{
'Value': '52.255.255.255' //Instance Public IP
}]
}
}
]
},
HostedZoneId: '/hostedzone/Z0.....' //Hosted Zone ID
}
route53.changeResourceRecordSets(params, function(err, data) {
console.log(err);
});
关于node.js - 在changeResourceRecordSets上获取InvalidInput错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31559137/