1. Packages
  2. Packages
  3. Linode Provider
  4. API Docs
  5. getDomainZonefile
Viewing docs for Linode v3.12.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
linode logo
Viewing docs for Linode v3.12.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Provides information about a Linode Domain Zonefile.

    Example Usage

    The following example shows how one might use this data source to access information about a Linode Domain Zonefile.

    using System.Collections.Generic;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var myZonefile = Linode.GetDomainZonefile.Invoke(new()
        {
            DomainId = 3150401,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v3/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := linode.GetDomainZonefile(ctx, &linode.GetDomainZonefileArgs{
    			DomainId: 3150401,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.LinodeFunctions;
    import com.pulumi.linode.inputs.GetDomainZonefileArgs;
    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 myZonefile = LinodeFunctions.getDomainZonefile(GetDomainZonefileArgs.builder()
                .domainId(3150401)
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const myZonefile = linode.getDomainZonefile({
        domainId: 3150401,
    });
    
    import pulumi
    import pulumi_linode as linode
    
    my_zonefile = linode.get_domain_zonefile(domain_id=3150401)
    
    variables:
      myZonefile:
        fn::invoke:
          Function: linode:getDomainZonefile
          Arguments:
            domainId: 3.150401e+06
    

    Using getDomainZonefile

    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 getDomainZonefile(args: GetDomainZonefileArgs, opts?: InvokeOptions): Promise<GetDomainZonefileResult>
    function getDomainZonefileOutput(args: GetDomainZonefileOutputArgs, opts?: InvokeOptions): Output<GetDomainZonefileResult>
    def get_domain_zonefile(domain_id: Optional[int] = None,
                            zone_files: Optional[Sequence[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> GetDomainZonefileResult
    def get_domain_zonefile_output(domain_id: Optional[pulumi.Input[int]] = None,
                            zone_files: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetDomainZonefileResult]
    func GetDomainZonefile(ctx *Context, args *GetDomainZonefileArgs, opts ...InvokeOption) (*GetDomainZonefileResult, error)
    func GetDomainZonefileOutput(ctx *Context, args *GetDomainZonefileOutputArgs, opts ...InvokeOption) GetDomainZonefileResultOutput

    > Note: This function is named GetDomainZonefile in the Go SDK.

    public static class GetDomainZonefile 
    {
        public static Task<GetDomainZonefileResult> InvokeAsync(GetDomainZonefileArgs args, InvokeOptions? opts = null)
        public static Output<GetDomainZonefileResult> Invoke(GetDomainZonefileInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDomainZonefileResult> getDomainZonefile(GetDomainZonefileArgs args, InvokeOptions options)
    public static Output<GetDomainZonefileResult> getDomainZonefile(GetDomainZonefileArgs args, InvokeOptions options)
    
    fn::invoke:
      function: linode:index/getDomainZonefile:getDomainZonefile
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DomainId int
    The associated domain's unique ID.
    ZoneFiles List<string>
    Array of strings representing the Domain Zonefile.
    DomainId int
    The associated domain's unique ID.
    ZoneFiles []string
    Array of strings representing the Domain Zonefile.
    domainId Integer
    The associated domain's unique ID.
    zoneFiles List<String>
    Array of strings representing the Domain Zonefile.
    domainId number
    The associated domain's unique ID.
    zoneFiles string[]
    Array of strings representing the Domain Zonefile.
    domain_id int
    The associated domain's unique ID.
    zone_files Sequence[str]
    Array of strings representing the Domain Zonefile.
    domainId Number
    The associated domain's unique ID.
    zoneFiles List<String>
    Array of strings representing the Domain Zonefile.

    getDomainZonefile Result

    The following output properties are available:

    DomainId int
    The associated domain's unique ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    ZoneFiles List<string>
    Array of strings representing the Domain Zonefile.
    DomainId int
    The associated domain's unique ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    ZoneFiles []string
    Array of strings representing the Domain Zonefile.
    domainId Integer
    The associated domain's unique ID.
    id String
    The provider-assigned unique ID for this managed resource.
    zoneFiles List<String>
    Array of strings representing the Domain Zonefile.
    domainId number
    The associated domain's unique ID.
    id string
    The provider-assigned unique ID for this managed resource.
    zoneFiles string[]
    Array of strings representing the Domain Zonefile.
    domain_id int
    The associated domain's unique ID.
    id str
    The provider-assigned unique ID for this managed resource.
    zone_files Sequence[str]
    Array of strings representing the Domain Zonefile.
    domainId Number
    The associated domain's unique ID.
    id String
    The provider-assigned unique ID for this managed resource.
    zoneFiles List<String>
    Array of strings representing the Domain Zonefile.

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo
    Viewing docs for Linode v3.12.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.