1. Packages
  2. Azure Native
  3. API Docs
  4. dns
  5. getZone
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi

azure-native.dns.getZone

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi

Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.

Uses Azure REST API version 2023-07-01-preview.

Other available API versions: 2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-10-01, 2018-03-01-preview, 2018-05-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native dns [ApiVersion]. See the version guide for details.

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:dns: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. The name is case insensitive.
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. The name is case insensitive.
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. The name is case insensitive.
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. The name is case insensitive.
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. The name is case insensitive.
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. The name is case insensitive.
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:

AzureApiVersion string
The Azure API version of the resource.
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.
SigningKeys List<Pulumi.AzureNative.Dns.Outputs.SigningKeyResponse>
The list of signing keys.
SystemData Pulumi.AzureNative.Dns.Outputs.SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
Type string
Resource type.
Etag string
The etag of the zone.
RegistrationVirtualNetworks List<Pulumi.AzureNative.Dns.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.Dns.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).
AzureApiVersion string
The Azure API version of the resource.
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.
SigningKeys []SigningKeyResponse
The list of signing keys.
SystemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
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).
azureApiVersion String
The Azure API version of the resource.
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.
signingKeys List<SigningKeyResponse>
The list of signing keys.
systemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
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).
azureApiVersion string
The Azure API version of the resource.
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.
signingKeys SigningKeyResponse[]
The list of signing keys.
systemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
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).
azure_api_version str
The Azure API version of the resource.
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.
signing_keys Sequence[SigningKeyResponse]
The list of signing keys.
system_data SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
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).
azureApiVersion String
The Azure API version of the resource.
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.
signingKeys List<Property Map>
The list of signing keys.
systemData Property Map
Metadata pertaining to creation and last modification of the resource.
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

DelegationSignerInfoResponse

DigestAlgorithmType This property is required. int
The digest algorithm type represents the standard digest algorithm number used to construct the digest. See: https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml
DigestValue This property is required. string
The digest value is a cryptographic hash value of the referenced DNSKEY Resource Record.
Record This property is required. string
The record represents a delegation signer (DS) record.
DigestAlgorithmType This property is required. int
The digest algorithm type represents the standard digest algorithm number used to construct the digest. See: https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml
DigestValue This property is required. string
The digest value is a cryptographic hash value of the referenced DNSKEY Resource Record.
Record This property is required. string
The record represents a delegation signer (DS) record.
digestAlgorithmType This property is required. Integer
The digest algorithm type represents the standard digest algorithm number used to construct the digest. See: https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml
digestValue This property is required. String
The digest value is a cryptographic hash value of the referenced DNSKEY Resource Record.
record This property is required. String
The record represents a delegation signer (DS) record.
digestAlgorithmType This property is required. number
The digest algorithm type represents the standard digest algorithm number used to construct the digest. See: https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml
digestValue This property is required. string
The digest value is a cryptographic hash value of the referenced DNSKEY Resource Record.
record This property is required. string
The record represents a delegation signer (DS) record.
digest_algorithm_type This property is required. int
The digest algorithm type represents the standard digest algorithm number used to construct the digest. See: https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml
digest_value This property is required. str
The digest value is a cryptographic hash value of the referenced DNSKEY Resource Record.
record This property is required. str
The record represents a delegation signer (DS) record.
digestAlgorithmType This property is required. Number
The digest algorithm type represents the standard digest algorithm number used to construct the digest. See: https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml
digestValue This property is required. String
The digest value is a cryptographic hash value of the referenced DNSKEY Resource Record.
record This property is required. String
The record represents a delegation signer (DS) record.

SigningKeyResponse

DelegationSignerInfo This property is required. List<Pulumi.AzureNative.Dns.Inputs.DelegationSignerInfoResponse>
The delegation signer information.
Flags This property is required. int
The flags specifies how the key is used.
KeyTag This property is required. int
The key tag value of the DNSKEY Resource Record.
Protocol This property is required. int
The protocol value. The value is always 3.
PublicKey This property is required. string
The public key, represented as a Base64 encoding.
SecurityAlgorithmType This property is required. int
The security algorithm type represents the standard security algorithm number of the DNSKEY Resource Record. See: https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml
DelegationSignerInfo This property is required. []DelegationSignerInfoResponse
The delegation signer information.
Flags This property is required. int
The flags specifies how the key is used.
KeyTag This property is required. int
The key tag value of the DNSKEY Resource Record.
Protocol This property is required. int
The protocol value. The value is always 3.
PublicKey This property is required. string
The public key, represented as a Base64 encoding.
SecurityAlgorithmType This property is required. int
The security algorithm type represents the standard security algorithm number of the DNSKEY Resource Record. See: https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml
delegationSignerInfo This property is required. List<DelegationSignerInfoResponse>
The delegation signer information.
flags This property is required. Integer
The flags specifies how the key is used.
keyTag This property is required. Integer
The key tag value of the DNSKEY Resource Record.
protocol This property is required. Integer
The protocol value. The value is always 3.
publicKey This property is required. String
The public key, represented as a Base64 encoding.
securityAlgorithmType This property is required. Integer
The security algorithm type represents the standard security algorithm number of the DNSKEY Resource Record. See: https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml
delegationSignerInfo This property is required. DelegationSignerInfoResponse[]
The delegation signer information.
flags This property is required. number
The flags specifies how the key is used.
keyTag This property is required. number
The key tag value of the DNSKEY Resource Record.
protocol This property is required. number
The protocol value. The value is always 3.
publicKey This property is required. string
The public key, represented as a Base64 encoding.
securityAlgorithmType This property is required. number
The security algorithm type represents the standard security algorithm number of the DNSKEY Resource Record. See: https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml
delegation_signer_info This property is required. Sequence[DelegationSignerInfoResponse]
The delegation signer information.
flags This property is required. int
The flags specifies how the key is used.
key_tag This property is required. int
The key tag value of the DNSKEY Resource Record.
protocol This property is required. int
The protocol value. The value is always 3.
public_key This property is required. str
The public key, represented as a Base64 encoding.
security_algorithm_type This property is required. int
The security algorithm type represents the standard security algorithm number of the DNSKEY Resource Record. See: https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml
delegationSignerInfo This property is required. List<Property Map>
The delegation signer information.
flags This property is required. Number
The flags specifies how the key is used.
keyTag This property is required. Number
The key tag value of the DNSKEY Resource Record.
protocol This property is required. Number
The protocol value. The value is always 3.
publicKey This property is required. String
The public key, represented as a Base64 encoding.
securityAlgorithmType This property is required. Number
The security algorithm type represents the standard security algorithm number of the DNSKEY Resource Record. See: https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml

SubResourceResponse

Id string
Resource Id.
Id string
Resource Id.
id String
Resource Id.
id string
Resource Id.
id str
Resource Id.
id String
Resource Id.

SystemDataResponse

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi