Record Sets - List By Dns Zone

Lists all record sets in a DNS zone.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets?api-version=2018-05-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets?$top={$top}&$recordsetnamesuffix={$recordsetnamesuffix}&api-version=2018-05-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription.

zoneName
path True

string

The name of the DNS zone (without a terminating dot).

api-version
query True

string

Specifies the API version.

$recordsetnamesuffix
query

string

The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .

$top
query

integer

int32

The maximum number of record sets to return. If not specified, returns up to 100 record sets.

Responses

Name Type Description
200 OK

RecordSetListResult

Success.

Other Status Codes

CloudError

Default response. It will be deserialized as per the Error definition.

Examples

List recordsets by zone

Sample Request

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/recordsets?api-version=2018-05-01

Sample Response

{
  "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA?api-version=2018-05-01&$skipToken=skipToken",
  "value": [
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1",
      "etag": "00000000-0000-0000-0000-000000000000",
      "name": "record1",
      "type": "Microsoft.Network/dnsZones/CAA",
      "properties": {
        "metadata": {
          "key1": "value1"
        },
        "TTL": 3600,
        "fqdn": "record1.zone1",
        "caaRecords": [
          {
            "flags": 0,
            "tag": "issue",
            "value": "ca.contoso.com"
          }
        ]
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1",
      "etag": "00000000-0000-0000-0000-000000000000",
      "name": "record1",
      "type": "Microsoft.Network/dnsZones/A",
      "properties": {
        "metadata": {
          "key1": "value1"
        },
        "TTL": 3600,
        "fqdn": "record1.zone1",
        "ARecords": [
          {
            "ipv4Address": "127.0.0.1"
          }
        ]
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record2",
      "etag": "00000000-0000-0000-0000-000000000000",
      "name": "record2",
      "type": "Microsoft.Network/dnsZones/CNAME",
      "properties": {
        "metadata": {
          "key1": "value1"
        },
        "TTL": 3600,
        "fqdn": "record2.zone1",
        "CNAMERecord": {
          "cname": "contoso.com"
        }
      }
    }
  ]
}

Definitions

Name Description
AaaaRecord

An AAAA record.

ARecord

An A record.

CaaRecord

A CAA record.

CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

CnameRecord

A CNAME record.

MxRecord

An MX record.

NsRecord

An NS record.

PtrRecord

A PTR record.

RecordSet

Describes a DNS record set (a collection of DNS records with the same name and type).

RecordSetListResult

The response to a record set List operation.

SoaRecord

An SOA record.

SrvRecord

An SRV record.

SubResource

A reference to a another resource

TxtRecord

A TXT record.

AaaaRecord

An AAAA record.

Name Type Description
ipv6Address

string

The IPv6 address of this AAAA record.

ARecord

An A record.

Name Type Description
ipv4Address

string

The IPv4 address of this A record.

CaaRecord

A CAA record.

Name Type Description
flags

integer

The flags for this CAA record as an integer between 0 and 255.

tag

string

The tag for this CAA record.

value

string

The value for this CAA record.

CloudError

An error response from the service.

Name Type Description
error

CloudErrorBody

Cloud error body.

CloudErrorBody

An error response from the service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

CloudErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

CnameRecord

A CNAME record.

Name Type Description
cname

string

The canonical name for this CNAME record.

MxRecord

An MX record.

Name Type Description
exchange

string

The domain name of the mail host for this MX record.

preference

integer

The preference value for this MX record.

NsRecord

An NS record.

Name Type Description
nsdname

string

The name server name for this NS record.

PtrRecord

A PTR record.

Name Type Description
ptrdname

string

The PTR target domain name for this PTR record.

RecordSet

Describes a DNS record set (a collection of DNS records with the same name and type).

Name Type Description
etag

string

The etag of the record set.

id

string

The ID of the record set.

name

string

The name of the record set.

properties.AAAARecords

AaaaRecord[]

The list of AAAA records in the record set.

properties.ARecords

ARecord[]

The list of A records in the record set.

properties.CNAMERecord

CnameRecord

The CNAME record in the record set.

properties.MXRecords

MxRecord[]

The list of MX records in the record set.

properties.NSRecords

NsRecord[]

The list of NS records in the record set.

properties.PTRRecords

PtrRecord[]

The list of PTR records in the record set.

properties.SOARecord

SoaRecord

The SOA record in the record set.

properties.SRVRecords

SrvRecord[]

The list of SRV records in the record set.

properties.TTL

integer

The TTL (time-to-live) of the records in the record set.

properties.TXTRecords

TxtRecord[]

The list of TXT records in the record set.

properties.caaRecords

CaaRecord[]

The list of CAA records in the record set.

properties.fqdn

string

Fully qualified domain name of the record set.

properties.metadata

object

The metadata attached to the record set.

properties.provisioningState

string

provisioning State of the record set.

properties.targetResource

SubResource

A reference to an azure resource from where the dns resource value is taken.

type

string

The type of the record set.

RecordSetListResult

The response to a record set List operation.

Name Type Description
nextLink

string

The continuation token for the next page of results.

value

RecordSet[]

Information about the record sets in the response.

SoaRecord

An SOA record.

Name Type Description
email

string

The email contact for this SOA record.

expireTime

integer

The expire time for this SOA record.

host

string

The domain name of the authoritative name server for this SOA record.

minimumTTL

integer

The minimum value for this SOA record. By convention this is used to determine the negative caching duration.

refreshTime

integer

The refresh value for this SOA record.

retryTime

integer

The retry time for this SOA record.

serialNumber

integer

The serial number for this SOA record.

SrvRecord

An SRV record.

Name Type Description
port

integer

The port value for this SRV record.

priority

integer

The priority value for this SRV record.

target

string

The target domain name for this SRV record.

weight

integer

The weight value for this SRV record.

SubResource

A reference to a another resource

Name Type Description
id

string

Resource Id.

TxtRecord

A TXT record.

Name Type Description
value

string[]

The text value of this TXT record.