gpt4 book ai didi

node.js - 在changeResourceRecordSets 上出现 InvalidInput 错误

转载 作者:太空宇宙 更新时间:2023-11-03 23:36:40 26 4
gpt4 key购买 nike

我正在尝试为托管区域创建记录集:

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:无效请求

最佳答案

我发现 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com