Private Zones - Delete

Deletes a Private DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. Private DNS zone cannot be deleted unless all virtual network links to it are removed.

DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}?api-version=2018-09-01

URI Parameters

Name In Required Type Description
privateZoneName
path True

string

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

resourceGroupName
path True

string

The name of the resource group.

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.

Request Header

Name Required Type Description
If-Match

string

The ETag of the Private DNS zone. Omit this value to always delete the current zone. Specify the last-seen ETag value to prevent accidentally deleting any concurrent changes.

Responses

Name Type Description
200 OK

The Private DNS zone has been deleted.

202 Accepted

The Private DNS zone delete operation has been accepted and will complete asynchronously.

204 No Content

The Private DNS zone was not found.

Other Status Codes

CloudError

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

Examples

DELETE Private DNS Zone

Sample Request

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

Sample Response

Location: https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsOperationResults/asyncOperationId?api-version=2018-09-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsOperationStatuses/asyncOperationId?api-version=2018-09-01
Retry-After: 60

Definitions

Name Description
CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

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.