Zones - List

Lists the DNS zones in all resource groups in a subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnszones?api-version=2018-05-01
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnszones?$top={$top}&api-version=2018-05-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

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

api-version
query True
  • string

Specifies the API version.

$top
query
  • integer
int32

The maximum number of DNS zones to return. If not specified, returns up to 100 zones.

Responses

Name Type Description
200 OK

Success.

Other Status Codes

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

Examples

List zones by subscription

Sample Request

GET https://management.azure.com/subscriptions/subid/providers/Microsoft.Network/dnszones?api-version=2018-05-01

Sample Response

{
  "nextLink": "https://servicehost/subscriptions/subid/providers/Microsoft.Network/dnsZones?api-version=2018-05-01&$skipToken=skipToken",
  "value": [
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1",
      "etag": "00000000-0000-0000-0000-000000000000",
      "location": "global",
      "name": "zone1",
      "type": "Microsoft.Network/dnsZones",
      "properties": {
        "maxNumberOfRecordSets": 5000,
        "numberOfRecordSets": 2,
        "nameServers": [
          "ns1-01.azure-dns.com",
          "ns2-01.azure-dns.net",
          "ns3-01.azure-dns.org",
          "ns4-01.azure-dns.info"
        ]
      },
      "tags": {
        "key1": "value1"
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/dnsZones/zone2",
      "etag": "00000000-0000-0000-0000-000000000000",
      "location": "global",
      "name": "zone2",
      "type": "Microsoft.Network/dnsZones",
      "properties": {
        "maxNumberOfRecordSets": 5000,
        "numberOfRecordSets": 300,
        "nameServers": [
          "ns1-02.azure-dns.com",
          "ns2-02.azure-dns.net",
          "ns3-02.azure-dns.org",
          "ns4-02.azure-dns.info"
        ]
      }
    }
  ]
}

Definitions

CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

SubResource

A reference to a another resource

Zone

Describes a DNS zone.

ZoneListResult

The response to a Zone List or ListAll operation.

ZoneType

The type of this DNS zone (Public or Private).

CloudError

An error response from the service.

Name Type Description
error

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

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.

SubResource

A reference to a another resource

Name Type Description
id
  • string

Resource Id.

Zone

Describes a DNS zone.

Name Type Description
etag
  • string

The etag of the zone.

id
  • string

Resource ID.

location
  • string

Resource location.

name
  • string

Resource name.

properties.maxNumberOfRecordSets
  • integer

The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.

properties.maxNumberOfRecordsPerRecordSet
  • integer

The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.

properties.nameServers
  • string[]

The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.

properties.numberOfRecordSets
  • integer

The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.

properties.registrationVirtualNetworks

A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.

properties.resolutionVirtualNetworks

A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.

properties.zoneType

The type of this DNS zone (Public or Private).

tags
  • object

Resource tags.

type
  • string

Resource type.

ZoneListResult

The response to a Zone List or ListAll operation.

Name Type Description
nextLink
  • string

The continuation token for the next page of results.

value

Information about the DNS zones.

ZoneType

The type of this DNS zone (Public or Private).

Name Type Description
Private
  • string
Public
  • string