1. Packages
  2. Azure Native v2
  3. API Docs
  4. network
  5. PrivateZone
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.network.PrivateZone

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

Describes a Private DNS zone. Azure REST API version: 2020-06-01. Prior API version in Azure Native 1.x: 2020-06-01.

Other available API versions: 2024-06-01.

Example Usage

PUT Private DNS Zone

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var privateZone = new AzureNative.Network.PrivateZone("privateZone", new()
    {
        Location = "Global",
        PrivateZoneName = "privatezone1.com",
        ResourceGroupName = "resourceGroup1",
        Tags = 
        {
            { "key1", "value1" },
        },
    });

});
Copy
package main

import (
	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewPrivateZone(ctx, "privateZone", &network.PrivateZoneArgs{
			Location:          pulumi.String("Global"),
			PrivateZoneName:   pulumi.String("privatezone1.com"),
			ResourceGroupName: pulumi.String("resourceGroup1"),
			Tags: pulumi.StringMap{
				"key1": pulumi.String("value1"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.PrivateZone;
import com.pulumi.azurenative.network.PrivateZoneArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var privateZone = new PrivateZone("privateZone", PrivateZoneArgs.builder()
            .location("Global")
            .privateZoneName("privatezone1.com")
            .resourceGroupName("resourceGroup1")
            .tags(Map.of("key1", "value1"))
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const privateZone = new azure_native.network.PrivateZone("privateZone", {
    location: "Global",
    privateZoneName: "privatezone1.com",
    resourceGroupName: "resourceGroup1",
    tags: {
        key1: "value1",
    },
});
Copy
import pulumi
import pulumi_azure_native as azure_native

private_zone = azure_native.network.PrivateZone("privateZone",
    location="Global",
    private_zone_name="privatezone1.com",
    resource_group_name="resourceGroup1",
    tags={
        "key1": "value1",
    })
Copy
resources:
  privateZone:
    type: azure-native:network:PrivateZone
    properties:
      location: Global
      privateZoneName: privatezone1.com
      resourceGroupName: resourceGroup1
      tags:
        key1: value1
Copy

Create PrivateZone Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new PrivateZone(name: string, args: PrivateZoneArgs, opts?: CustomResourceOptions);
@overload
def PrivateZone(resource_name: str,
                args: PrivateZoneArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def PrivateZone(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                resource_group_name: Optional[str] = None,
                location: Optional[str] = None,
                private_zone_name: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None)
func NewPrivateZone(ctx *Context, name string, args PrivateZoneArgs, opts ...ResourceOption) (*PrivateZone, error)
public PrivateZone(string name, PrivateZoneArgs args, CustomResourceOptions? opts = null)
public PrivateZone(String name, PrivateZoneArgs args)
public PrivateZone(String name, PrivateZoneArgs args, CustomResourceOptions options)
type: azure-native:network:PrivateZone
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PrivateZoneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PrivateZoneArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PrivateZoneArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PrivateZoneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PrivateZoneArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var privateZoneResource = new AzureNative.Network.PrivateZone("privateZoneResource", new()
{
    ResourceGroupName = "string",
    Location = "string",
    PrivateZoneName = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := network.NewPrivateZone(ctx, "privateZoneResource", &network.PrivateZoneArgs{
	ResourceGroupName: "string",
	Location:          "string",
	PrivateZoneName:   "string",
	Tags: map[string]interface{}{
		"string": "string",
	},
})
Copy
var privateZoneResource = new PrivateZone("privateZoneResource", PrivateZoneArgs.builder()
    .resourceGroupName("string")
    .location("string")
    .privateZoneName("string")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .build());
Copy
private_zone_resource = azure_native.network.PrivateZone("privateZoneResource",
    resource_group_name=string,
    location=string,
    private_zone_name=string,
    tags={
        string: string,
    })
Copy
const privateZoneResource = new azure_native.network.PrivateZone("privateZoneResource", {
    resourceGroupName: "string",
    location: "string",
    privateZoneName: "string",
    tags: {
        string: "string",
    },
});
Copy
type: azure-native:network:PrivateZone
properties:
    location: string
    privateZoneName: string
    resourceGroupName: string
    tags:
        string: string
Copy

PrivateZone Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The PrivateZone resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
Location Changes to this property will trigger replacement. string
The Azure Region where the resource lives
PrivateZoneName Changes to this property will trigger replacement. string
The name of the Private DNS zone (without a terminating dot).
Tags Dictionary<string, string>
Resource tags.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
Location Changes to this property will trigger replacement. string
The Azure Region where the resource lives
PrivateZoneName Changes to this property will trigger replacement. string
The name of the Private DNS zone (without a terminating dot).
Tags map[string]string
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
location Changes to this property will trigger replacement. String
The Azure Region where the resource lives
privateZoneName Changes to this property will trigger replacement. String
The name of the Private DNS zone (without a terminating dot).
tags Map<String,String>
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
location Changes to this property will trigger replacement. string
The Azure Region where the resource lives
privateZoneName Changes to this property will trigger replacement. string
The name of the Private DNS zone (without a terminating dot).
tags {[key: string]: string}
Resource tags.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
location Changes to this property will trigger replacement. str
The Azure Region where the resource lives
private_zone_name Changes to this property will trigger replacement. str
The name of the Private DNS zone (without a terminating dot).
tags Mapping[str, str]
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
location Changes to this property will trigger replacement. String
The Azure Region where the resource lives
privateZoneName Changes to this property will trigger replacement. String
The name of the Private DNS zone (without a terminating dot).
tags Map<String>
Resource tags.

Outputs

All input properties are implicitly available as output properties. Additionally, the PrivateZone resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
InternalId string
Private zone internal Id
MaxNumberOfRecordSets double
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.
MaxNumberOfVirtualNetworkLinks double
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.
MaxNumberOfVirtualNetworkLinksWithRegistration double
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.
Name string
The name of the resource
NumberOfRecordSets double
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.
NumberOfVirtualNetworkLinks double
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.
NumberOfVirtualNetworkLinksWithRegistration double
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.
ProvisioningState string
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
Type string
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
Etag string
The ETag of the zone.
Id string
The provider-assigned unique ID for this managed resource.
InternalId string
Private zone internal Id
MaxNumberOfRecordSets float64
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.
MaxNumberOfVirtualNetworkLinks float64
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.
MaxNumberOfVirtualNetworkLinksWithRegistration float64
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.
Name string
The name of the resource
NumberOfRecordSets float64
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.
NumberOfVirtualNetworkLinks float64
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.
NumberOfVirtualNetworkLinksWithRegistration float64
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.
ProvisioningState string
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
Type string
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
Etag string
The ETag of the zone.
id String
The provider-assigned unique ID for this managed resource.
internalId String
Private zone internal Id
maxNumberOfRecordSets Double
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.
maxNumberOfVirtualNetworkLinks Double
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.
maxNumberOfVirtualNetworkLinksWithRegistration Double
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.
name String
The name of the resource
numberOfRecordSets Double
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.
numberOfVirtualNetworkLinks Double
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.
numberOfVirtualNetworkLinksWithRegistration Double
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.
provisioningState String
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
type String
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
etag String
The ETag of the zone.
id string
The provider-assigned unique ID for this managed resource.
internalId string
Private zone internal Id
maxNumberOfRecordSets number
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.
maxNumberOfVirtualNetworkLinks number
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.
maxNumberOfVirtualNetworkLinksWithRegistration number
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.
name string
The name of the resource
numberOfRecordSets number
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.
numberOfVirtualNetworkLinks number
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.
numberOfVirtualNetworkLinksWithRegistration number
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.
provisioningState string
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
type string
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
etag string
The ETag of the zone.
id str
The provider-assigned unique ID for this managed resource.
internal_id str
Private zone internal Id
max_number_of_record_sets float
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.
max_number_of_virtual_network_links float
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.
max_number_of_virtual_network_links_with_registration float
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.
name str
The name of the resource
number_of_record_sets float
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.
number_of_virtual_network_links float
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.
number_of_virtual_network_links_with_registration float
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.
provisioning_state str
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
type str
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
etag str
The ETag of the zone.
id String
The provider-assigned unique ID for this managed resource.
internalId String
Private zone internal Id
maxNumberOfRecordSets Number
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.
maxNumberOfVirtualNetworkLinks Number
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.
maxNumberOfVirtualNetworkLinksWithRegistration Number
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.
name String
The name of the resource
numberOfRecordSets Number
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.
numberOfVirtualNetworkLinks Number
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.
numberOfVirtualNetworkLinksWithRegistration Number
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.
provisioningState String
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
type String
The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
etag String
The ETag of the zone.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:network:PrivateZone privatezone1.com /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi