gpt4 book ai didi

amazon-web-services - AWS : Get Route53 HostedZone Name

转载 作者:行者123 更新时间:2023-12-02 02:53:52 25 4
gpt4 key购买 nike

我将一组记录从云形成添加到route53,这是代码

 "RDSDNSRecord" : {
"Type" : "AWS::Route53::RecordSet",
"Properties" : {

"HostedZoneId" : { "Ref" : "DNSZoneId" },
"Comment" : "DNS name for RDS",
"Name" : { "Fn::Join" : [ "", [ { "Ref": "EnvType"}, "." ,"rds",".",{"Ref" : "AWS::Region"} ,".",{"Ref" : "HostedZone"},"." ] ] },
"Type" : "CNAME",
"TTL" : "900",
"ResourceRecords" : [
{
"Ref": "DatabaseEndPoint"
}
]
}
}

和 HostedZones 之前已创建。因此,为了设置这些记录,我使用这些参数。

"DNSZoneId":{
"Type" :"AWS::Route53::HostedZone::Id",
"ConstraintDescription":"must be the name of an existing ZoneId"
},
"HostedZone":{
"Type": "String",
"Description":"Relavent Domain Name"
}

aws 要求将完全限定的域名传递到参数 Name 中。所以我向用户询问了 DomainName 和 ZoneId。我觉得问ID和姓名都不对。有没有办法从 zoneId 获取名称或任何解决方法?

最佳答案

HostedZoneId 是可选的,您也可以使用HostedZoneName

HostedZoneId The ID of the hosted zone.

Required: Conditional. You must specify either the HostedZoneName or HostedZoneId, but you cannot specify both. If this record set is part of a record set group, do not specify this property.

关于amazon-web-services - AWS : Get Route53 HostedZone Name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50542982/

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