ALIYUN::DNS::DomainRecord is used to add a domain name system (DNS) record.
Syntax
{
"Type": "ALIYUN::DNS::DomainRecord",
"Properties": {
"RR": String,
"DomainName": String,
"Value": String,
"Priority": Integer,
"TTL": Integer,
"Line": String,
"Type": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
RR | String | Yes | No | The hostname. | For example, you must set this parameter to an at sign (@ ) if you want to resolve @.example.com . You cannot leave this parameter empty. |
DomainName | String | Yes | No | The domain name. | None. |
Value | String | Yes | No | The value of the DNS record. | None. |
Priority | Integer | No | Yes | The priority of the mail exchanger (MX) record. | None. |
TTL | Integer | No | Yes | The time to live (TTL) of the DNS record. | Default value: 600. Unit: seconds. For more information, see TTL. |
Line | String | No | Yes | The resolution line. | Default value: default. |
Type | String | Yes | No | The type of the DNS record. | For more information about DNS record types, see DNS record types. |
Response parameters
Fn::GetAtt
RecordId: the ID of the DNS record.
Examples
JSON
format{ "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" ] } } } }