Zones - Get
Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}?api-version=2018-05-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string |
The name of the resource group. |
|
subscription
|
path | True |
string |
Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription. |
|
zone
|
path | True |
string |
The name of the DNS zone (without a terminating dot). |
|
api-version
|
query | True |
string |
Specifies the API version. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Success. |
|
| Other Status Codes |
Default response. It will be deserialized as per the Error definition. |
Examples
Get zone
Sample request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1?api-version=2018-05-01
Sample response
{
"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"
}
}
Definitions
| Name | Description |
|---|---|
|
Cloud |
An error response from the service. |
|
Cloud |
An error response from the service. |
|
Sub |
A reference to a another resource |
| Zone |
Describes a DNS zone. |
|
Zone |
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 | Default value | Description |
|---|---|---|---|
| etag |
string |
The etag of the zone. |
|
| id |
string |
Resource ID. |
|
| location |
string |
Resource location. |
|
| name |
string |
Resource name. |
|
| properties.maxNumberOfRecordSets |
integer (int64) |
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 (int64) |
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 (int64) |
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 | Public |
The type of this DNS zone (Public or Private). |
|
| tags |
object |
Resource tags. |
|
| type |
string |
Resource type. |
ZoneType
The type of this DNS zone (Public or Private).
| Value | Description |
|---|---|
| Public | |
| Private |