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(

相关内容

热门资讯

分享实测!微乐自建房辅助工具,... 分享实测!微乐自建房辅助工具,微乐小程序免费黑科技(开挂自建房)软件1、首先打开微乐自建房辅助工具辅...
推荐一款!微乐微信自建房辅助工... 推荐一款!微乐微信自建房辅助工具插件,微乐小程序免费黑科技(开挂自建房)插件1、任何微乐微信自建房辅...
实测揭晓!微乐自建房辅助工具插... 实测揭晓!微乐自建房辅助工具插件,微乐家乡麻将自建房辅助app(开挂自建房)攻略;所有人都在同一条线...
盘点一款!微乐小程序麻将自建房... 盘点一款!微乐小程序麻将自建房辅助工具插件,微乐家乡麻将自建房辅助app(开挂自建房)教程1、微乐小...
推荐十款!微乐自建房辅助工具脚... 推荐十款!微乐自建房辅助工具脚本,微乐小程序免费黑科技(开挂自建房)教程1、微乐自建房辅助工具脚本辅...
盘点几款!微乐自建房辅助工具免... 盘点几款!微乐自建房辅助工具免费app,微乐自建房脚本免费入口(开挂自建房)app1.微乐自建房辅助...
最新技巧!微信卡五星辅助器,微... 最新技巧!微信卡五星辅助器,微乐自建房脚本免费入口(开挂自建房)方法微信卡五星辅助器透视方法中分为三...
实操分享!微乐自建房辅助工具免... 实操分享!微乐自建房辅助工具免费app,微乐小程序免费黑科技(开挂自建房)软件1、进入游戏-大厅左侧...
技术分享!微信卡五星辅助器,微... 技术分享!微信卡五星辅助器,微乐自建房脚本免费入口(开挂自建房)工具1)微信卡五星辅助器有没有挂:进...
盘点十款!微乐自建房辅助工具,... 盘点十款!微乐自建房辅助工具,微乐家乡麻将自建房辅助app(开挂自建房)软件1、任何微乐家乡麻将自建...