Microsoft.Network dnsZones/CNAME template reference

Template format

To create a Microsoft.Network/dnsZones/CNAME resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Network/dnsZones/CNAME",
  "apiVersion": "2018-05-01",
  "properties": {
    "metadata": {},
    "TTL": "integer",
    "targetResource": {
      "id": "string"
    },
    "ARecords": [
      {
        "ipv4Address": "string"
      }
    ],
    "AAAARecords": [
      {
        "ipv6Address": "string"
      }
    ],
    "MXRecords": [
      {
        "preference": "integer",
        "exchange": "string"
      }
    ],
    "NSRecords": [
      {
        "nsdname": "string"
      }
    ],
    "PTRRecords": [
      {
        "ptrdname": "string"
      }
    ],
    "SRVRecords": [
      {
        "priority": "integer",
        "weight": "integer",
        "port": "integer",
        "target": "string"
      }
    ],
    "TXTRecords": [
      {
        "value": [
          "string"
        ]
      }
    ],
    "CNAMERecord": {
      "cname": "string"
    },
    "SOARecord": {
      "host": "string",
      "email": "string",
      "serialNumber": "integer",
      "refreshTime": "integer",
      "retryTime": "integer",
      "expireTime": "integer",
      "minimumTTL": "integer"
    },
    "caaRecords": [
      {
        "flags": "integer",
        "tag": "string",
        "value": "string"
      }
    ]
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Network/dnsZones/CNAME object

Name Type Required Value
name string Yes
type enum Yes CNAME
-or-
Microsoft.Network/dnsZones/CNAME

See Set name and type for child resources.
apiVersion enum Yes 2018-05-01
properties object Yes The properties of the record set. - RecordSetProperties object

RecordSetProperties object

Name Type Required Value
metadata object No The metadata attached to the record set.
TTL integer No The TTL (time-to-live) of the records in the record set.
targetResource object No A reference to an azure resource from where the dns resource value is taken. - SubResource object
ARecords array No The list of A records in the record set. - ARecord object
AAAARecords array No The list of AAAA records in the record set. - AaaaRecord object
MXRecords array No The list of MX records in the record set. - MxRecord object
NSRecords array No The list of NS records in the record set. - NsRecord object
PTRRecords array No The list of PTR records in the record set. - PtrRecord object
SRVRecords array No The list of SRV records in the record set. - SrvRecord object
TXTRecords array No The list of TXT records in the record set. - TxtRecord object
CNAMERecord object No The CNAME record in the record set. - CnameRecord object
SOARecord object No The SOA record in the record set. - SoaRecord object
caaRecords array No The list of CAA records in the record set. - CaaRecord object

SubResource object

Name Type Required Value
id string No Resource Id.

ARecord object

Name Type Required Value
ipv4Address string No The IPv4 address of this A record.

AaaaRecord object

Name Type Required Value
ipv6Address string No The IPv6 address of this AAAA record.

MxRecord object

Name Type Required Value
preference integer No The preference value for this MX record.
exchange string No The domain name of the mail host for this MX record.

NsRecord object

Name Type Required Value
nsdname string No The name server name for this NS record.

PtrRecord object

Name Type Required Value
ptrdname string No The PTR target domain name for this PTR record.

SrvRecord object

Name Type Required Value
priority integer No The priority value for this SRV record.
weight integer No The weight value for this SRV record.
port integer No The port value for this SRV record.
target string No The target domain name for this SRV record.

TxtRecord object

Name Type Required Value
value array No The text value of this TXT record. - string

CnameRecord object

Name Type Required Value
cname string No The canonical name for this CNAME record.

SoaRecord object

Name Type Required Value
host string No The domain name of the authoritative name server for this SOA record.
email string No The email contact for this SOA record.
serialNumber integer No The serial number for this SOA record.
refreshTime integer No The refresh value for this SOA record.
retryTime integer No The retry time for this SOA record.
expireTime integer No The expire time for this SOA record.
minimumTTL integer No The minimum value for this SOA record. By convention this is used to determine the negative caching duration.

CaaRecord object

Name Type Required Value
flags integer No The flags for this CAA record as an integer between 0 and 255.
tag string No The tag for this CAA record.
value string No The value for this CAA record.