AWSC++Route53Unknown(100)errors
创始人
2024-09-24 01:01:10
0

AWS C++ SDK中Route53 Unknown (100) errors通常是因为请求中缺少必要的参数或参数值不正确引起的。

以下为一个示例,可以帮助你定位问题和解决方案:

#include 
#include 
#include 

Aws::String CreateChangeRequest(const Aws::String& domain, 
                                const Aws::String& subdomain, 
                                const Aws::String& ip,
                                const Aws::String& action)
{
    Aws::Route53::Route53Client route53Client;
    Aws::Route53::Model::ChangeResourceRecordSetsRequest changeRequest;

    // Route53 HostedZone ID for your domain
    changeRequest.SetHostedZoneId("HOSTED-ZONE-ID");

    // Create new Resource Record Set for subdomain
    Aws::Route53::Model::ResourceRecordSet newRecordSet;
    newRecordSet.SetName(subdomain + domain);
    newRecordSet.SetType(Aws::Route53::Model::RRType::A);
    newRecordSet.SetTTL(300);

    // Action to take for the resource record set
    Aws::Route53::Model::ChangeAction changeAction;
    if ("CREATE" == action)
    {
        changeAction = Aws::Route53::Model::ChangeAction::CREATE;

        // Add new Resource Record to set
        Aws::Route53::Model::ResourceRecord newRecord;
        newRecord.SetValue(ip);
        newRecordSet.AddResourceRecords(newRecord);
    }
    else if ("DELETE" == action)
    {
        changeAction = Aws::Route53::Model::ChangeAction::DELETE;

        // Remove all Resource Records from set
        Aws::Route53::Model::ResourceRecord emptyRecord;
        newRecordSet.SetResourceRecords({ emptyRecord });
    }
    else
    {
        printf("Invalid Action '%s' specified. Please specify CREATE or DELETE.\n", action.c_str()); 
        return "";
    }

    // Add new Record Set to Change Request
    changeRequest.SetChangeBatch(Aws::Route53::Model::ChangeBatch().WithChanges(

相关内容

热门资讯

程序员教你!hhpoker德州... 程序员教你!hhpoker德州机器人,hhpoker德州辅助,技巧教程(一贯真的是有挂)-哔哩哔哩;...
玩家必看教程!wpk是真的还是... 玩家必看教程!wpk是真的还是假的,wepoker透视脚本,透视教程(一贯确实有挂)-哔哩哔哩;亲,...
发现一款!wepokerplu... 发现一款!wepokerplus开挂,wpk官网下载链接,辅助教程(一直真的是有挂)-哔哩哔哩;1、...
揭秘几款!hhpoker可以控... 揭秘几款!hhpoker可以控制牌吗,wepoker透视脚本是什么,攻略教程!(其实是有挂的)-哔哩...
一分钟快速了解!wejoker... 一分钟快速了解!wejoker透视方法,wepoker线上大神,必备教程(果然确实有挂)-哔哩哔哩;...
一分钟了解!hhpoker免费... 一分钟了解!hhpoker免费透视脚本,pokemmo辅助器,透牌教程(一贯确实有挂)-哔哩哔哩;1...
透视规律!wepoker怎么买... 透视规律!wepoker怎么买辅助,wepoker分析,透牌教程(原来有挂)-哔哩哔哩;1.wepo...
我来向大家传授!wejoker... 我来向大家传授!wejoker开挂,竞技联盟辅助插件,分享教程(原来真的是有挂)-哔哩哔哩;竞技联盟...
重大发现!wepoker免费脚... 重大发现!wepoker免费脚本,wepoker免费辅助器,解说技巧(一直是有挂)-哔哩哔哩;1.w...
热点推荐!wepoker透视脚... 热点推荐!wepoker透视脚本安卓,德扑HHpoker有挂吗,存在挂教程(原来真的是有挂)-哔哩哔...