Go AWS Route53-添加简单记录

Go AWS Route53-添加简单记录,go,dns,amazon-route53,Go,Dns,Amazon Route53,我能够使用API,使用[Weight:AWS.Int64(Weight)],为AWS Route53添加“Weighted”A记录,使用下面的代码效果非常好。但是如何添加“Simple”一个记录——我没有看到Simple的选项 params := &route53.ChangeResourceRecordSetsInput{ ChangeBatch: &route53.ChangeBatch{ // Required Changes: []*rou

我能够使用API,使用[Weight:AWS.Int64(Weight)],为AWS Route53添加“Weighted”A记录,使用下面的代码效果非常好。但是如何添加“Simple”一个记录——我没有看到Simple的选项

    params := &route53.ChangeResourceRecordSetsInput{
    ChangeBatch: &route53.ChangeBatch{ // Required
        Changes: []*route53.Change{ // Required
            { // Required
                Action: aws.String("UPSERT"), // Required
                ResourceRecordSet: &route53.ResourceRecordSet{ // Required
                    Name: aws.String(name), // Required
                    Type: aws.String("A"),  // Required
                    ResourceRecords: []*route53.ResourceRecord{
                        { // Required
                            Value: aws.String(target), // Required
                        },
                    },
                    TTL: aws.Int64(TTL),
                    //Region: aws.String("us-east-1"),
                    Weight:        aws.Int64(weight),
                    SetIdentifier: aws.String("-"),
                },
            },
        },
        Comment: aws.String("Sample update."),
    },
    HostedZoneId: aws.String(zoneId), // Required
}

“简单”记录只是Web控制台中的一个短语。只需将记录保留为不带任何
权重
延迟
标志,它将成为Route53内的标准DNS记录

请参阅
类型ResourceRecordSet
文档,标记了必填字段。其余的,如
Weight
是可选的

与使用CLI()几乎相同,只需将相同的字段移植到Go结构