1. Packages
  2. Linode
  3. API Docs
  4. getDomainZonefile
Linode v4.24.0 published on Wednesday, Jul 24, 2024 by Pulumi

linode.getDomainZonefile

Explore with Pulumi AI

linode logo
Linode v4.24.0 published on Wednesday, Jul 24, 2024 by Pulumi

    Provides information about a Linode Domain Zonefile. For more information, see the Linode APIv4 docs.

    Example Usage

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

    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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v4/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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var myZonefile = Linode.GetDomainZonefile.Invoke(new()
        {
            DomainId = 3150401,
        });
    
    });
    
    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());
    
        }
    }
    
    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,
                            opts: Optional[InvokeOptions] = None) -> GetDomainZonefileResult
    def get_domain_zonefile_output(domain_id: Optional[pulumi.Input[int]] = 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: linode:index/getDomainZonefile:getDomainZonefile
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DomainId int
    The associated domain's unique ID.
    DomainId int
    The associated domain's unique ID.
    domainId Integer
    The associated domain's unique ID.
    domainId number
    The associated domain's unique ID.
    domain_id int
    The associated domain's unique ID.
    domainId Number
    The associated domain's unique ID.

    getDomainZonefile Result

    The following output properties are available:

    DomainId int
    The associated domain's unique ID.
    Id string
    ZoneFiles List<string>
    Array of strings representing the Domain Zonefile.
    DomainId int
    The associated domain's unique ID.
    Id string
    ZoneFiles []string
    Array of strings representing the Domain Zonefile.
    domainId Integer
    The associated domain's unique ID.
    id String
    zoneFiles List<String>
    Array of strings representing the Domain Zonefile.
    domainId number
    The associated domain's unique ID.
    id string
    zoneFiles string[]
    Array of strings representing the Domain Zonefile.
    domain_id int
    The associated domain's unique ID.
    id str
    zone_files Sequence[str]
    Array of strings representing the Domain Zonefile.
    domainId Number
    The associated domain's unique ID.
    id String
    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
    Linode v4.24.0 published on Wednesday, Jul 24, 2024 by Pulumi