ALIYUN::DNS::DomainRecord类型用于添加解析记录。
语法
{
"Type": "ALIYUN::DNS::DomainRecord",
"Properties": {
"RR": String,
"DomainName": String,
"Value": String,
"Priority": Integer,
"TTL": Integer,
"Line": String,
"Type": String
}
}
属性
返回值
Fn::GetAtt
RecordId:解析记录的ID。
示例
YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Resources:
DomainRecord:
Type: ALIYUN::DNS::DomainRecord
Properties:
RR: '@'
Type: A
DomainName:
Ref: DnsDomainName
Value:
Fn::Select:
- '0'
- Fn::GetAtt:
- Server
- PublicIps
TTL: 600
Outputs:
RecordId:
Description: Parse the ID of the record
Value:
Fn::GetAtt:
- DomainRecord
- RecordId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"DomainRecord": {
"Type": "ALIYUN::DNS::DomainRecord",
"Properties": {
"RR": "@",
"Type": "A",
"DomainName": {
"Ref": "DnsDomainName"
},
"Value": {
"Fn::Select": [
"0",
{
"Fn::GetAtt": [
"Server",
"PublicIps"
]
}
]
},
"TTL": 600
}
}
},
"Outputs": {
"RecordId": {
"Description": "Parse the ID of the record",
"Value": {
"Fn::GetAtt": [
"DomainRecord",
"RecordId"
]
}
}
}
}
该文章对您有帮助吗?
- 本页导读 (1)
- 语法
- 属性
- 返回值
- 示例