GetZone
Use this data source to access information about an existing DNS Zone.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Dns.GetZone.InvokeAsync(new Azure.Dns.GetZoneArgs
{
Name = "search-eventhubns",
ResourceGroupName = "search-service",
}));
this.DnsZoneId = example.Apply(example => example.Id);
}
[Output("dnsZoneId")]
public Output<string> DnsZoneId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/dns"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "search-service"
example, err := dns.LookupZone(ctx, &dns.LookupZoneArgs{
Name: "search-eventhubns",
ResourceGroupName: &opt0,
}, nil)
if err != nil {
return err
}
ctx.Export("dnsZoneId", example.Id)
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.dns.get_zone(name="search-eventhubns",
resource_group_name="search-service")
pulumi.export("dnsZoneId", example.id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.dns.getZone({
name: "search-eventhubns",
resourceGroupName: "search-service",
});
export const dnsZoneId = example.then(example => example.id);Using GetZone
function getZone(args: GetZoneArgs, opts?: InvokeOptions): Promise<GetZoneResult>function get_zone(name=None, resource_group_name=None, opts=None)func LookupZone(ctx *Context, args *LookupZoneArgs, opts ...InvokeOption) (*LookupZoneResult, error)Note: This function is named
LookupZonein the Go SDK.
public static class GetZone {
public static Task<GetZoneResult> InvokeAsync(GetZoneArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
The name of the DNS Zone.
- Resource
Group stringName The Name of the Resource Group where the DNS Zone exists. If the Name of the Resource Group is not provided, the first DNS Zone from the list of DNS Zones in your subscription that matches
namewill be returned.
- Name string
The name of the DNS Zone.
- Resource
Group stringName The Name of the Resource Group where the DNS Zone exists. If the Name of the Resource Group is not provided, the first DNS Zone from the list of DNS Zones in your subscription that matches
namewill be returned.
- name string
The name of the DNS Zone.
- resource
Group stringName The Name of the Resource Group where the DNS Zone exists. If the Name of the Resource Group is not provided, the first DNS Zone from the list of DNS Zones in your subscription that matches
namewill be returned.
- name str
The name of the DNS Zone.
- resource_
group_ strname The Name of the Resource Group where the DNS Zone exists. If the Name of the Resource Group is not provided, the first DNS Zone from the list of DNS Zones in your subscription that matches
namewill be returned.
GetZone Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Max
Number intOf Record Sets Maximum number of Records in the zone.
- Name string
- Name
Servers List<string> A list of values that make up the NS record for the zone.
- Number
Of intRecord Sets The number of records already in the zone.
- Resource
Group stringName - Dictionary<string, string>
A mapping of tags to assign to the EventHub Namespace.
- Id string
The provider-assigned unique ID for this managed resource.
- Max
Number intOf Record Sets Maximum number of Records in the zone.
- Name string
- Name
Servers []string A list of values that make up the NS record for the zone.
- Number
Of intRecord Sets The number of records already in the zone.
- Resource
Group stringName - map[string]string
A mapping of tags to assign to the EventHub Namespace.
- id string
The provider-assigned unique ID for this managed resource.
- max
Number numberOf Record Sets Maximum number of Records in the zone.
- name string
- name
Servers string[] A list of values that make up the NS record for the zone.
- number
Of numberRecord Sets The number of records already in the zone.
- resource
Group stringName - {[key: string]: string}
A mapping of tags to assign to the EventHub Namespace.
- id str
The provider-assigned unique ID for this managed resource.
- max_
number_ floatof_ record_ sets Maximum number of Records in the zone.
- name str
- name_
servers List[str] A list of values that make up the NS record for the zone.
- number_
of_ floatrecord_ sets The number of records already in the zone.
- resource_
group_ strname - Dict[str, str]
A mapping of tags to assign to the EventHub Namespace.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.