Linode v4.22.0 published on Tuesday, Jun 25, 2024 by Pulumi
linode.getDomainRecord
Explore with Pulumi AI
Provides information about a Linode Domain Record.
Example Usage
The following example shows how one might use this data source to access information about a Linode Domain Record.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const myRecord = linode.getDomainRecord({
    id: 14950401,
    domainId: 3150401,
});
const myWwwRecord = linode.getDomainRecord({
    name: "www",
    domainId: 3150401,
});
import pulumi
import pulumi_linode as linode
my_record = linode.get_domain_record(id=14950401,
    domain_id=3150401)
my_www_record = linode.get_domain_record(name="www",
    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.LookupDomainRecord(ctx, &linode.LookupDomainRecordArgs{
			Id:       pulumi.IntRef(14950401),
			DomainId: 3150401,
		}, nil)
		if err != nil {
			return err
		}
		_, err = linode.LookupDomainRecord(ctx, &linode.LookupDomainRecordArgs{
			Name:     pulumi.StringRef("www"),
			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 myRecord = Linode.GetDomainRecord.Invoke(new()
    {
        Id = 14950401,
        DomainId = 3150401,
    });
    var myWwwRecord = Linode.GetDomainRecord.Invoke(new()
    {
        Name = "www",
        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.GetDomainRecordArgs;
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 myRecord = LinodeFunctions.getDomainRecord(GetDomainRecordArgs.builder()
            .id("14950401")
            .domainId("3150401")
            .build());
        final var myWwwRecord = LinodeFunctions.getDomainRecord(GetDomainRecordArgs.builder()
            .name("www")
            .domainId("3150401")
            .build());
    }
}
variables:
  myRecord:
    fn::invoke:
      Function: linode:getDomainRecord
      Arguments:
        id: '14950401'
        domainId: '3150401'
  myWwwRecord:
    fn::invoke:
      Function: linode:getDomainRecord
      Arguments:
        name: www
        domainId: '3150401'
Using getDomainRecord
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 getDomainRecord(args: GetDomainRecordArgs, opts?: InvokeOptions): Promise<GetDomainRecordResult>
function getDomainRecordOutput(args: GetDomainRecordOutputArgs, opts?: InvokeOptions): Output<GetDomainRecordResult>def get_domain_record(domain_id: Optional[int] = None,
                      id: Optional[int] = None,
                      name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDomainRecordResult
def get_domain_record_output(domain_id: Optional[pulumi.Input[int]] = None,
                      id: Optional[pulumi.Input[int]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetDomainRecordResult]func LookupDomainRecord(ctx *Context, args *LookupDomainRecordArgs, opts ...InvokeOption) (*LookupDomainRecordResult, error)
func LookupDomainRecordOutput(ctx *Context, args *LookupDomainRecordOutputArgs, opts ...InvokeOption) LookupDomainRecordResultOutput> Note: This function is named LookupDomainRecord in the Go SDK.
public static class GetDomainRecord 
{
    public static Task<GetDomainRecordResult> InvokeAsync(GetDomainRecordArgs args, InvokeOptions? opts = null)
    public static Output<GetDomainRecordResult> Invoke(GetDomainRecordInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDomainRecordResult> getDomainRecord(GetDomainRecordArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: linode:index/getDomainRecord:getDomainRecord
  arguments:
    # arguments dictionaryThe following arguments are supported:
getDomainRecord Result
The following output properties are available:
- Domain
Id int - The associated domain's unique ID.
 - Port int
 - The port this Record points to.
 - Priority int
 - The priority of the target host. Lower values are preferred.
 - Protocol string
 - The protocol this Record's service communicates with. Only valid for SRV records.
 - Service string
 - The service this Record identified. Only valid for SRV records.
 - Tag string
 - The tag portion of a CAA record.
 - Target string
 - The target for this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
 - Ttl
Sec int - The amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
 - Type string
 - The type of Record this is in the DNS system. See all record types here.
 - Weight int
 - The relative weight of this Record. Higher values are preferred.
 - Id int
 - The unique ID of the Domain Record.
 - Name string
 - The name of the Record.
 
- Domain
Id int - The associated domain's unique ID.
 - Port int
 - The port this Record points to.
 - Priority int
 - The priority of the target host. Lower values are preferred.
 - Protocol string
 - The protocol this Record's service communicates with. Only valid for SRV records.
 - Service string
 - The service this Record identified. Only valid for SRV records.
 - Tag string
 - The tag portion of a CAA record.
 - Target string
 - The target for this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
 - Ttl
Sec int - The amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
 - Type string
 - The type of Record this is in the DNS system. See all record types here.
 - Weight int
 - The relative weight of this Record. Higher values are preferred.
 - Id int
 - The unique ID of the Domain Record.
 - Name string
 - The name of the Record.
 
- domain
Id Integer - The associated domain's unique ID.
 - port Integer
 - The port this Record points to.
 - priority Integer
 - The priority of the target host. Lower values are preferred.
 - protocol String
 - The protocol this Record's service communicates with. Only valid for SRV records.
 - service String
 - The service this Record identified. Only valid for SRV records.
 - tag String
 - The tag portion of a CAA record.
 - target String
 - The target for this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
 - ttl
Sec Integer - The amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
 - type String
 - The type of Record this is in the DNS system. See all record types here.
 - weight Integer
 - The relative weight of this Record. Higher values are preferred.
 - id Integer
 - The unique ID of the Domain Record.
 - name String
 - The name of the Record.
 
- domain
Id number - The associated domain's unique ID.
 - port number
 - The port this Record points to.
 - priority number
 - The priority of the target host. Lower values are preferred.
 - protocol string
 - The protocol this Record's service communicates with. Only valid for SRV records.
 - service string
 - The service this Record identified. Only valid for SRV records.
 - tag string
 - The tag portion of a CAA record.
 - target string
 - The target for this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
 - ttl
Sec number - The amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
 - type string
 - The type of Record this is in the DNS system. See all record types here.
 - weight number
 - The relative weight of this Record. Higher values are preferred.
 - id number
 - The unique ID of the Domain Record.
 - name string
 - The name of the Record.
 
- domain_
id int - The associated domain's unique ID.
 - port int
 - The port this Record points to.
 - priority int
 - The priority of the target host. Lower values are preferred.
 - protocol str
 - The protocol this Record's service communicates with. Only valid for SRV records.
 - service str
 - The service this Record identified. Only valid for SRV records.
 - tag str
 - The tag portion of a CAA record.
 - target str
 - The target for this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
 - ttl_
sec int - The amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
 - type str
 - The type of Record this is in the DNS system. See all record types here.
 - weight int
 - The relative weight of this Record. Higher values are preferred.
 - id int
 - The unique ID of the Domain Record.
 - name str
 - The name of the Record.
 
- domain
Id Number - The associated domain's unique ID.
 - port Number
 - The port this Record points to.
 - priority Number
 - The priority of the target host. Lower values are preferred.
 - protocol String
 - The protocol this Record's service communicates with. Only valid for SRV records.
 - service String
 - The service this Record identified. Only valid for SRV records.
 - tag String
 - The tag portion of a CAA record.
 - target String
 - The target for this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
 - ttl
Sec Number - The amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers.
 - type String
 - The type of Record this is in the DNS system. See all record types here.
 - weight Number
 - The relative weight of this Record. Higher values are preferred.
 - id Number
 - The unique ID of the Domain Record.
 - name String
 - The name of the Record.
 
Package Details
- Repository
 - Linode pulumi/pulumi-linode
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
linodeTerraform Provider.