1. Packages
  2. NS1
  3. API Docs
  4. getZone
NS1 v3.4.2 published on Tuesday, Sep 17, 2024 by Pulumi

ns1.getZone

Explore with Pulumi AI

ns1 logo
NS1 v3.4.2 published on Tuesday, Sep 17, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as ns1 from "@pulumi/ns1";
    
    // Get details about a NS1 Zone.
    const example = ns1.getZone({
        zone: "terraform.example.io",
    });
    
    import pulumi
    import pulumi_ns1 as ns1
    
    # Get details about a NS1 Zone.
    example = ns1.get_zone(zone="terraform.example.io")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-ns1/sdk/v3/go/ns1"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Get details about a NS1 Zone.
    		_, err := ns1.LookupZone(ctx, &ns1.LookupZoneArgs{
    			Zone: "terraform.example.io",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ns1 = Pulumi.Ns1;
    
    return await Deployment.RunAsync(() => 
    {
        // Get details about a NS1 Zone.
        var example = Ns1.GetZone.Invoke(new()
        {
            Zone = "terraform.example.io",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ns1.Ns1Functions;
    import com.pulumi.ns1.inputs.GetZoneArgs;
    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) {
            // Get details about a NS1 Zone.
            final var example = Ns1Functions.getZone(GetZoneArgs.builder()
                .zone("terraform.example.io")
                .build());
    
        }
    }
    
    variables:
      # Get details about a NS1 Zone.
      example:
        fn::invoke:
          Function: ns1:getZone
          Arguments:
            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_ports: Optional[Sequence[int]] = None,
                 additional_primaries: Optional[Sequence[str]] = None,
                 primary_port: Optional[int] = None,
                 zone: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetZoneResult
    def get_zone_output(additional_ports: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
                 additional_primaries: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 primary_port: Optional[pulumi.Input[int]] = 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)
    }
    public static CompletableFuture<GetZoneResult> getZone(GetZoneArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ns1:index/getZone:getZone
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Zone string
    The domain name of the zone.
    AdditionalPorts List<int>
    AdditionalPrimaries List<string>
    List of additional IPv4 addresses for the primary zone.
    PrimaryPort int
    Zone string
    The domain name of the zone.
    AdditionalPorts []int
    AdditionalPrimaries []string
    List of additional IPv4 addresses for the primary zone.
    PrimaryPort int
    zone String
    The domain name of the zone.
    additionalPorts List<Integer>
    additionalPrimaries List<String>
    List of additional IPv4 addresses for the primary zone.
    primaryPort Integer
    zone string
    The domain name of the zone.
    additionalPorts number[]
    additionalPrimaries string[]
    List of additional IPv4 addresses for the primary zone.
    primaryPort number
    zone str
    The domain name of the zone.
    additional_ports Sequence[int]
    additional_primaries Sequence[str]
    List of additional IPv4 addresses for the primary zone.
    primary_port int
    zone String
    The domain name of the zone.
    additionalPorts List<Number>
    additionalPrimaries List<String>
    List of additional IPv4 addresses for the primary zone.
    primaryPort Number

    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.
    Tags Dictionary<string, string>
    Ttl int
    The SOA TTL.
    Zone string
    AdditionalPorts List<int>
    AdditionalPrimaries List<string>
    List of additional IPv4 addresses for the primary zone.
    PrimaryPort int
    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.
    Tags map[string]string
    Ttl int
    The SOA TTL.
    Zone string
    AdditionalPorts []int
    AdditionalPrimaries []string
    List of additional IPv4 addresses for the primary zone.
    PrimaryPort int
    dnsServers String
    Authoritative Name Servers.
    dnssec Boolean
    Whether or not DNSSEC is enabled for the zone.
    expiry Integer
    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<Integer>
    List of network IDs (int) for which the zone should be made available. Default is network 0, the primary NSONE Global Network.
    nxTtl Integer
    The SOA NX TTL.
    primary String
    The primary zones' IPv4 address.
    refresh Integer
    The SOA Refresh.
    retry Integer
    The SOA Retry.
    secondaries List<GetZoneSecondary>
    List of secondary servers. Secondaries is documented below.
    tags Map<String,String>
    ttl Integer
    The SOA TTL.
    zone String
    additionalPorts List<Integer>
    additionalPrimaries List<String>
    List of additional IPv4 addresses for the primary zone.
    primaryPort Integer
    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.
    tags {[key: string]: string}
    ttl number
    The SOA TTL.
    zone string
    additionalPorts number[]
    additionalPrimaries string[]
    List of additional IPv4 addresses for the primary zone.
    primaryPort number
    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.
    tags Mapping[str, str]
    ttl int
    The SOA TTL.
    zone str
    additional_ports Sequence[int]
    additional_primaries Sequence[str]
    List of additional IPv4 addresses for the primary zone.
    primary_port int
    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 List<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 List<Property Map>
    List of secondary servers. Secondaries is documented below.
    tags Map<String>
    ttl Number
    The SOA TTL.
    zone String
    additionalPorts List<Number>
    additionalPrimaries List<String>
    List of additional IPv4 addresses for the primary zone.
    primaryPort Number

    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 List<Integer>
    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 Integer
    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.
    ip String
    IPv4 address of the secondary server.
    networks List<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.

    Package Details

    Repository
    NS1 pulumi/pulumi-ns1
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ns1 Terraform Provider.
    ns1 logo
    NS1 v3.4.2 published on Tuesday, Sep 17, 2024 by Pulumi