1. Packages
  2. Dnsimple Provider
  3. API Docs
  4. getZone
DNSimple v4.2.0 published on Friday, Oct 18, 2024 by Pulumi

dnsimple.getZone

Explore with Pulumi AI

dnsimple logo
DNSimple v4.2.0 published on Friday, Oct 18, 2024 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",
    });
    
    import pulumi
    import pulumi_dnsimple as dnsimple
    
    foobar = dnsimple.get_zone(name="dnsimple.com")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      foobar:
        fn::invoke:
          Function: dnsimple:getZone
          Arguments:
            name: dnsimple.com
    

    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>
    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]
    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: dnsimple:index/getZone:getZone
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name string
    name String
    name string
    name str
    name 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 logo
    DNSimple v4.2.0 published on Friday, Oct 18, 2024 by Pulumi