Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

getZone

Provides details about a NS1 Zone. Use this if you would simply like to read information from NS1 into your configurations. For read/write operations, you should use a resource.

Example Usage

using Pulumi;
using Ns1 = Pulumi.Ns1;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Ns1.GetZone.InvokeAsync(new Ns1.GetZoneArgs
        {
            Zone = "terraform.example.io",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-ns1/sdk/v2/go/ns1"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ns1.LookupZone(ctx, &GetZoneArgs{
			Zone: "terraform.example.io",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_ns1 as ns1

example = ns1.get_zone(zone="terraform.example.io")
import * as pulumi from "@pulumi/pulumi";
import * as ns1 from "@pulumi/ns1";

// Get details about a NS1 Zone.
const example = pulumi.output(ns1.getZone({
    zone: "terraform.example.io",
}));

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>
def get_zone(additional_primaries: Optional[Sequence[str]] = None,
             zone: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetZoneResult
def get_zone_output(additional_primaries: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
             zone: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetZoneResult]
func LookupZone(ctx *Context, args *LookupZoneArgs, opts ...InvokeOption) (*LookupZoneResult, error)
func LookupZoneOutput(ctx *Context, args *LookupZoneOutputArgs, opts ...InvokeOption) LookupZoneResultOutput

> 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)
}

The following arguments are supported:

Zone string
The domain name of the zone.
AdditionalPrimaries List<string>
List of additional IPv4 addresses for the primary zone.
Zone string
The domain name of the zone.
AdditionalPrimaries []string
List of additional IPv4 addresses for the primary zone.
zone string
The domain name of the zone.
additionalPrimaries string[]
List of additional IPv4 addresses for the primary zone.
zone str
The domain name of the zone.
additional_primaries Sequence[str]
List of additional IPv4 addresses for the primary zone.

getZone Result

The following output properties are available:

DnsServers string
Authoritative Name Servers.
Dnssec bool
Whether or not DNSSEC is enabled for the zone.
Expiry int
The SOA Expiry.
Hostmaster string
The SOA Hostmaster.
Id string
The provider-assigned unique ID for this managed resource.
Link string
The linked target zone.
Networks List<int>
List of network IDs (int) for which the zone should be made available. Default is network 0, the primary NSONE Global Network.
NxTtl int
The SOA NX TTL.
Primary string
The primary zones' IPv4 address.
Refresh int
The SOA Refresh.
Retry int
The SOA Retry.
Secondaries List<GetZoneSecondary>
List of secondary servers. Secondaries is documented below.
Ttl int
The SOA TTL.
Zone string
AdditionalPrimaries List<string>
List of additional IPv4 addresses for the primary zone.
DnsServers string
Authoritative Name Servers.
Dnssec bool
Whether or not DNSSEC is enabled for the zone.
Expiry int
The SOA Expiry.
Hostmaster string
The SOA Hostmaster.
Id string
The provider-assigned unique ID for this managed resource.
Link string
The linked target zone.
Networks []int
List of network IDs (int) for which the zone should be made available. Default is network 0, the primary NSONE Global Network.
NxTtl int
The SOA NX TTL.
Primary string
The primary zones' IPv4 address.
Refresh int
The SOA Refresh.
Retry int
The SOA Retry.
Secondaries []GetZoneSecondary
List of secondary servers. Secondaries is documented below.
Ttl int
The SOA TTL.
Zone string
AdditionalPrimaries []string
List of additional IPv4 addresses for the primary zone.
dnsServers string
Authoritative Name Servers.
dnssec boolean
Whether or not DNSSEC is enabled for the zone.
expiry number
The SOA Expiry.
hostmaster string
The SOA Hostmaster.
id string
The provider-assigned unique ID for this managed resource.
link string
The linked target zone.
networks number[]
List of network IDs (int) for which the zone should be made available. Default is network 0, the primary NSONE Global Network.
nxTtl number
The SOA NX TTL.
primary string
The primary zones' IPv4 address.
refresh number
The SOA Refresh.
retry number
The SOA Retry.
secondaries GetZoneSecondary[]
List of secondary servers. Secondaries is documented below.
ttl number
The SOA TTL.
zone string
additionalPrimaries string[]
List of additional IPv4 addresses for the primary zone.
dns_servers str
Authoritative Name Servers.
dnssec bool
Whether or not DNSSEC is enabled for the zone.
expiry int
The SOA Expiry.
hostmaster str
The SOA Hostmaster.
id str
The provider-assigned unique ID for this managed resource.
link str
The linked target zone.
networks Sequence[int]
List of network IDs (int) for which the zone should be made available. Default is network 0, the primary NSONE Global Network.
nx_ttl int
The SOA NX TTL.
primary str
The primary zones' IPv4 address.
refresh int
The SOA Refresh.
retry int
The SOA Retry.
secondaries Sequence[GetZoneSecondary]
List of secondary servers. Secondaries is documented below.
ttl int
The SOA TTL.
zone str
additional_primaries Sequence[str]
List of additional IPv4 addresses for the primary zone.

Supporting Types

GetZoneSecondary

Ip string
IPv4 address of the secondary server.
Networks List<int>
List of network IDs (int) for which the zone should be made available. Default is network 0, the primary NSONE Global Network.
Notify bool
Whether we send NOTIFY messages to the secondary host when the zone changes. Default false.
Port int
Port of the the secondary server. Default 53.
Ip string
IPv4 address of the secondary server.
Networks []int
List of network IDs (int) for which the zone should be made available. Default is network 0, the primary NSONE Global Network.
Notify bool
Whether we send NOTIFY messages to the secondary host when the zone changes. Default false.
Port int
Port of the the secondary server. Default 53.
ip string
IPv4 address of the secondary server.
networks number[]
List of network IDs (int) for which the zone should be made available. Default is network 0, the primary NSONE Global Network.
notify boolean
Whether we send NOTIFY messages to the secondary host when the zone changes. Default false.
port number
Port of the the secondary server. Default 53.
ip str
IPv4 address of the secondary server.
networks Sequence[int]
List of network IDs (int) for which the zone should be made available. Default is network 0, the primary NSONE Global Network.
notify bool
Whether we send NOTIFY messages to the secondary host when the zone changes. Default false.
port int
Port of the the secondary server. Default 53.

Package Details

Repository
https://github.com/pulumi/pulumi-ns1
License
Apache-2.0
Notes
This Pulumi package is based on the ns1 Terraform Provider.