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

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "DomainRecord": {
      "Type": "ALIYUN::DNS::DomainRecord",
      "Properties": {
        "RR": {
          "Ref": "RR"
        },
        "DomainName": {
          "Ref": "DomainName"
        },
        "Value": {
          "Ref": "Value"
        },
        "Priority": {
          "Ref": "Priority"
        },
        "TTL": {
          "Ref": "TTL"
        },
        "Line": {
          "Ref": "Line"
        },
        "Type": {
          "Ref": "Type"
        }
      }
    }
  },
  "Parameters": {
    "RR": {
      "Type": "String",
      "Description": "Host record, if you want to resolve @.example.com, the host record should fill in \"@\" instead of empty"
    },
    "DomainName": {
      "Type": "String",
      "Description": "Domain name"
    },
    "Value": {
      "Type": "String",
      "Description": "Record value"
    },
    "Priority": {
      "Type": "Number",
      "Description": "The priority of the MX record, the value range [1,10], when the record type is MX record, this parameter must be",
      "MaxValue": 10,
      "MinValue": 1
    },
    "TTL": {
      "Default": 600,
      "Type": "Number",
      "Description": "The resolution time is valid. The default is 600 seconds (10 minutes). See the TTL definition."
    },
    "Line": {
      "Type": "String",
      "Description": "Parse the line, the default is default. See parsing line enumeration"
    },
    "Type": {
      "Type": "String",
      "Description": "Parse record type, see parsing record type format"
    }
  },
  "Outputs": {
    "RecordId": {
      "Description": "Parse the ID of the record",
      "Value": {
        "Fn::GetAtt": [
          "DomainRecord",
          "RecordId"
        ]
      }
    }
  }
}