1. Packages
  2. Azure Native v2
  3. API Docs
  4. network
  5. getZone
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.getZone

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

Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. Azure REST API version: 2018-05-01.

Other available API versions: 2023-07-01-preview.

Using getZone

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getZone(args: GetZoneArgs, opts?: InvokeOptions): Promise<GetZoneResult>
function getZoneOutput(args: GetZoneOutputArgs, opts?: InvokeOptions): Output<GetZoneResult>
Copy
def get_zone(resource_group_name: Optional[str] = None,
             zone_name: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetZoneResult
def get_zone_output(resource_group_name: Optional[pulumi.Input[str]] = None,
             zone_name: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetZoneResult]
Copy
func LookupZone(ctx *Context, args *LookupZoneArgs, opts ...InvokeOption) (*LookupZoneResult, error)
func LookupZoneOutput(ctx *Context, args *LookupZoneOutputArgs, opts ...InvokeOption) LookupZoneResultOutput
Copy

> Note: This function is named LookupZone in the Go SDK.

public static class GetZone 
{
    public static Task<GetZoneResult> InvokeAsync(GetZoneArgs args, InvokeOptions? opts = null)
    public static Output<GetZoneResult> Invoke(GetZoneInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetZoneResult> getZone(GetZoneArgs args, InvokeOptions options)
public static Output<GetZoneResult> getZone(GetZoneArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:network:getZone
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
ZoneName
This property is required.
Changes to this property will trigger replacement.
string
The name of the DNS zone (without a terminating dot).
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
ZoneName
This property is required.
Changes to this property will trigger replacement.
string
The name of the DNS zone (without a terminating dot).
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
zoneName
This property is required.
Changes to this property will trigger replacement.
String
The name of the DNS zone (without a terminating dot).
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
zoneName
This property is required.
Changes to this property will trigger replacement.
string
The name of the DNS zone (without a terminating dot).
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
zone_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the DNS zone (without a terminating dot).
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
zoneName
This property is required.
Changes to this property will trigger replacement.
String
The name of the DNS zone (without a terminating dot).

getZone Result

The following output properties are available:

Id string
Resource ID.
Location string
Resource location.
MaxNumberOfRecordSets double
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.
MaxNumberOfRecordsPerRecordSet double
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.
Name string
Resource name.
NameServers List<string>
The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
NumberOfRecordSets double
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.
Type string
Resource type.
Etag string
The etag of the zone.
RegistrationVirtualNetworks List<Pulumi.AzureNative.Network.Outputs.SubResourceResponse>
A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.
ResolutionVirtualNetworks List<Pulumi.AzureNative.Network.Outputs.SubResourceResponse>
A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.
Tags Dictionary<string, string>
Resource tags.
ZoneType string
The type of this DNS zone (Public or Private).
Id string
Resource ID.
Location string
Resource location.
MaxNumberOfRecordSets float64
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.
MaxNumberOfRecordsPerRecordSet float64
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.
Name string
Resource name.
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.
NumberOfRecordSets float64
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.
Type string
Resource type.
Etag string
The etag of the zone.
RegistrationVirtualNetworks []SubResourceResponse
A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.
ResolutionVirtualNetworks []SubResourceResponse
A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.
Tags map[string]string
Resource tags.
ZoneType string
The type of this DNS zone (Public or Private).
id String
Resource ID.
location String
Resource location.
maxNumberOfRecordSets Double
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.
maxNumberOfRecordsPerRecordSet Double
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.
name String
Resource name.
nameServers List<String>
The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
numberOfRecordSets Double
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.
type String
Resource type.
etag String
The etag of the zone.
registrationVirtualNetworks List<SubResourceResponse>
A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.
resolutionVirtualNetworks List<SubResourceResponse>
A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.
tags Map<String,String>
Resource tags.
zoneType String
The type of this DNS zone (Public or Private).
id string
Resource ID.
location string
Resource location.
maxNumberOfRecordSets number
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.
maxNumberOfRecordsPerRecordSet number
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.
name string
Resource name.
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.
numberOfRecordSets number
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.
type string
Resource type.
etag string
The etag of the zone.
registrationVirtualNetworks SubResourceResponse[]
A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.
resolutionVirtualNetworks SubResourceResponse[]
A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.
tags {[key: string]: string}
Resource tags.
zoneType string
The type of this DNS zone (Public or Private).
id str
Resource ID.
location str
Resource location.
max_number_of_record_sets float
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.
max_number_of_records_per_record_set float
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.
name str
Resource name.
name_servers Sequence[str]
The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
number_of_record_sets float
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.
type str
Resource type.
etag str
The etag of the zone.
registration_virtual_networks Sequence[SubResourceResponse]
A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.
resolution_virtual_networks Sequence[SubResourceResponse]
A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.
tags Mapping[str, str]
Resource tags.
zone_type str
The type of this DNS zone (Public or Private).
id String
Resource ID.
location String
Resource location.
maxNumberOfRecordSets Number
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.
maxNumberOfRecordsPerRecordSet Number
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.
name String
Resource name.
nameServers List<String>
The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
numberOfRecordSets Number
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.
type String
Resource type.
etag String
The etag of the zone.
registrationVirtualNetworks List<Property Map>
A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.
resolutionVirtualNetworks List<Property Map>
A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.
tags Map<String>
Resource tags.
zoneType String
The type of this DNS zone (Public or Private).

Supporting Types

SubResourceResponse

Id This property is required. string
Resource ID.
Id This property is required. string
Resource ID.
id This property is required. String
Resource ID.
id This property is required. string
Resource ID.
id This property is required. str
Resource ID.
id This property is required. String
Resource ID.

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