Partager via


Microsoft.Network privateDnsZones/A 2024-06-01

Bicep resource definition

The privateDnsZones/A resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/privateDnsZones/A resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Network/privateDnsZones/A@2024-06-01' = {
  parent: resourceSymbolicName
  etag: 'string'
  name: 'string'
  properties: {
    aaaaRecords: [
      {
        ipv6Address: 'string'
      }
    ]
    aRecords: [
      {
        ipv4Address: 'string'
      }
    ]
    cnameRecord: {
      cname: 'string'
    }
    metadata: {
      {customized property}: 'string'
    }
    mxRecords: [
      {
        exchange: 'string'
        preference: int
      }
    ]
    ptrRecords: [
      {
        ptrdname: 'string'
      }
    ]
    soaRecord: {
      email: 'string'
      expireTime: int
      host: 'string'
      minimumTtl: int
      refreshTime: int
      retryTime: int
      serialNumber: int
    }
    srvRecords: [
      {
        port: int
        priority: int
        target: 'string'
        weight: int
      }
    ]
    ttl: int
    txtRecords: [
      {
        value: [
          'string'
        ]
      }
    ]
  }
}

Property values

AaaaRecord

Name Description Value
ipv6Address The IPv6 address of this AAAA record. string

ARecord

Name Description Value
ipv4Address The IPv4 address of this A record. string

CnameRecord

Name Description Value
cname The canonical name for this CNAME record. string

Microsoft.Network/privateDnsZones/A

Name Description Value
etag The ETag of the record set. string
name The resource name string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: privateDnsZones
properties The properties of the record set. RecordSetProperties

MxRecord

Name Description Value
exchange The domain name of the mail host for this MX record. string
preference The preference value for this MX record. int

PtrRecord

Name Description Value
ptrdname The PTR target domain name for this PTR record. string

RecordSetProperties

Name Description Value
aaaaRecords The list of AAAA records in the record set. AaaaRecord[]
aRecords The list of A records in the record set. ARecord[]
cnameRecord The CNAME record in the record set. CnameRecord
metadata The metadata attached to the record set. RecordSetPropertiesMetadata
mxRecords The list of MX records in the record set. MxRecord[]
ptrRecords The list of PTR records in the record set. PtrRecord[]
soaRecord The SOA record in the record set. SoaRecord
srvRecords The list of SRV records in the record set. SrvRecord[]
ttl The TTL (time-to-live) of the records in the record set. int
txtRecords The list of TXT records in the record set. TxtRecord[]

RecordSetPropertiesMetadata

Name Description Value

SoaRecord

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

SrvRecord

Name Description Value
port The port value for this SRV record. int
priority The priority value for this SRV record. int
target The target domain name for this SRV record. string
weight The weight value for this SRV record. int

TxtRecord

Name Description Value
value The text value of this TXT record. string[]

Quickstart samples

The following quickstart samples deploy this resource type.

Bicep File Description
Application Gateway with internal API Management and Web App Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
Azure Cloud Shell - VNet This template deploys Azure Cloud Shell resources into an Azure virtual network.
Create an AppServicePlan and App in an ASEv3 Create an AppServicePlan and App in an ASEv3
Create API Management in Internal VNet with App Gateway This template demonstrates how to Create a instance of Azure API Management on a private network protected by Azure Application Gateway.
Create Application Gateway with Certificates This template shows how to generate Key Vault self-signed certificates, then reference from Application Gateway.
SonarQube on Web App with PostgreSQL and VNet integration This template provides easy to deploy SonarQube to Web App on Linux with PostgreSQL Flexible Server, VNet integration and private DNS.

ARM template resource definition

The privateDnsZones/A resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/privateDnsZones/A resource, add the following JSON to your template.

{
  "type": "Microsoft.Network/privateDnsZones/A",
  "apiVersion": "2024-06-01",
  "name": "string",
  "etag": "string",
  "properties": {
    "aaaaRecords": [
      {
        "ipv6Address": "string"
      }
    ],
    "aRecords": [
      {
        "ipv4Address": "string"
      }
    ],
    "cnameRecord": {
      "cname": "string"
    },
    "metadata": {
      "{customized property}": "string"
    },
    "mxRecords": [
      {
        "exchange": "string",
        "preference": "int"
      }
    ],
    "ptrRecords": [
      {
        "ptrdname": "string"
      }
    ],
    "soaRecord": {
      "email": "string",
      "expireTime": "int",
      "host": "string",
      "minimumTtl": "int",
      "refreshTime": "int",
      "retryTime": "int",
      "serialNumber": "int"
    },
    "srvRecords": [
      {
        "port": "int",
        "priority": "int",
        "target": "string",
        "weight": "int"
      }
    ],
    "ttl": "int",
    "txtRecords": [
      {
        "value": [ "string" ]
      }
    ]
  }
}

Property values

AaaaRecord

Name Description Value
ipv6Address The IPv6 address of this AAAA record. string

ARecord

Name Description Value
ipv4Address The IPv4 address of this A record. string

CnameRecord

Name Description Value
cname The canonical name for this CNAME record. string

Microsoft.Network/privateDnsZones/A

Name Description Value
apiVersion The api version '2024-06-01'
etag The ETag of the record set. string
name The resource name string (required)
properties The properties of the record set. RecordSetProperties
type The resource type 'Microsoft.Network/privateDnsZones/A'

MxRecord

Name Description Value
exchange The domain name of the mail host for this MX record. string
preference The preference value for this MX record. int

PtrRecord

Name Description Value
ptrdname The PTR target domain name for this PTR record. string

RecordSetProperties

Name Description Value
aaaaRecords The list of AAAA records in the record set. AaaaRecord[]
aRecords The list of A records in the record set. ARecord[]
cnameRecord The CNAME record in the record set. CnameRecord
metadata The metadata attached to the record set. RecordSetPropertiesMetadata
mxRecords The list of MX records in the record set. MxRecord[]
ptrRecords The list of PTR records in the record set. PtrRecord[]
soaRecord The SOA record in the record set. SoaRecord
srvRecords The list of SRV records in the record set. SrvRecord[]
ttl The TTL (time-to-live) of the records in the record set. int
txtRecords The list of TXT records in the record set. TxtRecord[]

RecordSetPropertiesMetadata

Name Description Value

SoaRecord

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

SrvRecord

Name Description Value
port The port value for this SRV record. int
priority The priority value for this SRV record. int
target The target domain name for this SRV record. string
weight The weight value for this SRV record. int

TxtRecord

Name Description Value
value The text value of this TXT record. string[]

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Application Gateway with internal API Management and Web App

Deploy to Azure
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
Azure Cloud Shell - VNet

Deploy to Azure
This template deploys Azure Cloud Shell resources into an Azure virtual network.
Create an AppServicePlan and App in an ASEv3

Deploy to Azure
Create an AppServicePlan and App in an ASEv3
Create API Management in Internal VNet with App Gateway

Deploy to Azure
This template demonstrates how to Create a instance of Azure API Management on a private network protected by Azure Application Gateway.
Create Application Gateway with Certificates

Deploy to Azure
This template shows how to generate Key Vault self-signed certificates, then reference from Application Gateway.
SonarQube on Web App with PostgreSQL and VNet integration

Deploy to Azure
This template provides easy to deploy SonarQube to Web App on Linux with PostgreSQL Flexible Server, VNet integration and private DNS.

Terraform (AzAPI provider) resource definition

The privateDnsZones/A resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/privateDnsZones/A resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/privateDnsZones/A@2024-06-01"
  name = "string"
  etag = "string"
  body = jsonencode({
    properties = {
      aaaaRecords = [
        {
          ipv6Address = "string"
        }
      ]
      aRecords = [
        {
          ipv4Address = "string"
        }
      ]
      cnameRecord = {
        cname = "string"
      }
      metadata = {
        {customized property} = "string"
      }
      mxRecords = [
        {
          exchange = "string"
          preference = int
        }
      ]
      ptrRecords = [
        {
          ptrdname = "string"
        }
      ]
      soaRecord = {
        email = "string"
        expireTime = int
        host = "string"
        minimumTtl = int
        refreshTime = int
        retryTime = int
        serialNumber = int
      }
      srvRecords = [
        {
          port = int
          priority = int
          target = "string"
          weight = int
        }
      ]
      ttl = int
      txtRecords = [
        {
          value = [
            "string"
          ]
        }
      ]
    }
  })
}

Property values

AaaaRecord

Name Description Value
ipv6Address The IPv6 address of this AAAA record. string

ARecord

Name Description Value
ipv4Address The IPv4 address of this A record. string

CnameRecord

Name Description Value
cname The canonical name for this CNAME record. string

Microsoft.Network/privateDnsZones/A

Name Description Value
etag The ETag of the record set. string
name The resource name string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: privateDnsZones
properties The properties of the record set. RecordSetProperties
type The resource type "Microsoft.Network/privateDnsZones/A@2024-06-01"

MxRecord

Name Description Value
exchange The domain name of the mail host for this MX record. string
preference The preference value for this MX record. int

PtrRecord

Name Description Value
ptrdname The PTR target domain name for this PTR record. string

RecordSetProperties

Name Description Value
aaaaRecords The list of AAAA records in the record set. AaaaRecord[]
aRecords The list of A records in the record set. ARecord[]
cnameRecord The CNAME record in the record set. CnameRecord
metadata The metadata attached to the record set. RecordSetPropertiesMetadata
mxRecords The list of MX records in the record set. MxRecord[]
ptrRecords The list of PTR records in the record set. PtrRecord[]
soaRecord The SOA record in the record set. SoaRecord
srvRecords The list of SRV records in the record set. SrvRecord[]
ttl The TTL (time-to-live) of the records in the record set. int
txtRecords The list of TXT records in the record set. TxtRecord[]

RecordSetPropertiesMetadata

Name Description Value

SoaRecord

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

SrvRecord

Name Description Value
port The port value for this SRV record. int
priority The priority value for this SRV record. int
target The target domain name for this SRV record. string
weight The weight value for this SRV record. int

TxtRecord

Name Description Value
value The text value of this TXT record. string[]