Private Zones - List

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

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

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

$top
query

integer

int32

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

Responses

Name Type Description
200 OK

PrivateZoneListResult

Success.

Other Status Codes

CloudError

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

Examples

GET Private DNS Zone by Subscription

Sample request

GET https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.Network/privateDnsZones?api-version=2018-09-01

Sample response

{
  "nextLink": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.Network/privateDnsZones?api-version=2018-09-01&$skipToken=skipToken",
  "value": [
    {
      "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com",
      "name": "privatezone1.com",
      "type": "Microsoft.Network/privateDnsZones",
      "location": "global",
      "etag": "00000000-0000-0000-0000-000000000000",
      "properties": {
        "maxNumberOfRecordSets": 5000,
        "numberOfRecordSets": 1,
        "maxNumberOfVirtualNetworkLinks": 100,
        "numberOfVirtualNetworkLinks": 0,
        "maxNumberOfVirtualNetworkLinksWithRegistration": 50,
        "numberOfVirtualNetworkLinksWithRegistration": 0,
        "provisioningState": "Succeeded"
      },
      "tags": {
        "key1": "value1"
      }
    },
    {
      "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup2/providers/Microsoft.Network/privateDnsZones/privatezone2.com",
      "name": "privatezone2.com",
      "type": "Microsoft.Network/privateDnsZones",
      "location": "global",
      "etag": "00000000-0000-0000-0000-000000000000",
      "properties": {
        "maxNumberOfRecordSets": 5000,
        "numberOfRecordSets": 1,
        "maxNumberOfVirtualNetworkLinks": 100,
        "numberOfVirtualNetworkLinks": 0,
        "maxNumberOfVirtualNetworkLinksWithRegistration": 50,
        "numberOfVirtualNetworkLinksWithRegistration": 0,
        "provisioningState": "Succeeded"
      }
    }
  ]
}

Definitions

Name Description
CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

PrivateZone

Describes a Private DNS zone.

PrivateZoneListResult

The response to a Private DNS zone list operation.

ProvisioningState

The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.

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.

PrivateZone

Describes a Private DNS zone.

Name Type Description
etag

string

The ETag of the zone.

id

string

Fully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'.

location

string

The Azure Region where the resource lives

name

string

The name of the resource

properties.maxNumberOfRecordSets

integer

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

properties.maxNumberOfVirtualNetworkLinks

integer

The maximum number of virtual networks that can be linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored.

properties.maxNumberOfVirtualNetworkLinksWithRegistration

integer

The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled. 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 Private DNS zone. This is a read-only property and any attempt to set this value will be ignored.

properties.numberOfVirtualNetworkLinks

integer

The current number of virtual networks that are linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored.

properties.numberOfVirtualNetworkLinksWithRegistration

integer

The current number of virtual networks that are linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored.

properties.provisioningState

ProvisioningState

The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.

tags

object

Resource tags.

type

string

The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.

PrivateZoneListResult

The response to a Private DNS zone list operation.

Name Type Description
nextLink

string

The continuation token for the next page of results.

value

PrivateZone[]

Information about the Private DNS zones.

ProvisioningState

The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.

Name Type Description
Canceled

string

Creating

string

Deleting

string

Failed

string

Succeeded

string

Updating

string