1. Packages
  2. Dnsimple Provider
  3. API Docs
  4. getZone
DNSimple v4.3.0 published on Thursday, Apr 10, 2025 by Pulumi

dnsimple.getZone

Explore with Pulumi AI

DNSimple v4.3.0 published on Thursday, Apr 10, 2025 by Pulumi

Get information about a DNSimple zone.

!> Data source is getting deprecated in favor of dnsimple\_zone resource.

Get zone:

import * as pulumi from "@pulumi/pulumi";
import * as dnsimple from "@pulumi/dnsimple";

const foobar = dnsimple.getZone({
    name: "dnsimple.com",
});
Copy
import pulumi
import pulumi_dnsimple as dnsimple

foobar = dnsimple.get_zone(name="dnsimple.com")
Copy
package main

import (
	"github.com/pulumi/pulumi-dnsimple/sdk/v4/go/dnsimple"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dnsimple.LookupZone(ctx, &dnsimple.LookupZoneArgs{
			Name: "dnsimple.com",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DNSimple = Pulumi.DNSimple;

return await Deployment.RunAsync(() => 
{
    var foobar = DNSimple.GetZone.Invoke(new()
    {
        Name = "dnsimple.com",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dnsimple.DnsimpleFunctions;
import com.pulumi.dnsimple.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) {
        final var foobar = DnsimpleFunctions.getZone(GetZoneArgs.builder()
            .name("dnsimple.com")
            .build());

    }
}
Copy
variables:
  foobar:
    fn::invoke:
      function: dnsimple:getZone
      arguments:
        name: dnsimple.com
Copy

The following arguments are supported:

  • name - (Required) The name of the zone

The following additional attributes are exported:

  • id - The zone ID
  • account_id - The account ID
  • reverse - True for a reverse zone, false for a forward zone.

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(name: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetZoneResult
def get_zone_output(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: dnsimple:index/getZone:getZone
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name This property is required. string
name This property is required. String
name This property is required. string
name This property is required. str
name This property is required. String

getZone Result

The following output properties are available:

AccountId int
Id int
Name string
Reverse bool
AccountId int
Id int
Name string
Reverse bool
accountId Integer
id Integer
name String
reverse Boolean
accountId number
id number
name string
reverse boolean
account_id int
id int
name str
reverse bool
accountId Number
id Number
name String
reverse Boolean

Package Details

Repository
DNSimple pulumi/pulumi-dnsimple
License
Apache-2.0
Notes
This Pulumi package is based on the dnsimple Terraform Provider.
DNSimple v4.3.0 published on Thursday, Apr 10, 2025 by Pulumi