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.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var myRecord = Linode.GetDomainRecord.Invoke(new()
    {
        DomainId = 3150401,
        Id = 14950401,
    });

    var myWwwRecord = Linode.GetDomainRecord.Invoke(new()
    {
        DomainId = 3150401,
        Name = "www",
    });

});
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{
			DomainId: 3150401,
			Id:       pulumi.IntRef(14950401),
		}, nil)
		if err != nil {
			return err
		}
		_, err = linode.LookupDomainRecord(ctx, &linode.LookupDomainRecordArgs{
			DomainId: 3150401,
			Name:     pulumi.StringRef("www"),
		}, 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.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()
            .domainId("3150401")
            .id("14950401")
            .build());

        final var myWwwRecord = LinodeFunctions.getDomainRecord(GetDomainRecordArgs.builder()
            .domainId("3150401")
            .name("www")
            .build());

    }
}
import pulumi
import pulumi_linode as linode

my_record = linode.get_domain_record(domain_id=3150401,
    id=14950401)
my_www_record = linode.get_domain_record(domain_id=3150401,
    name="www")
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const myRecord = linode.getDomainRecord({
    domainId: 3150401,
    id: 14950401,
});
const myWwwRecord = linode.getDomainRecord({
    domainId: 3150401,
    name: "www",
});
variables:
  myRecord:
    fn::invoke:
      Function: linode:getDomainRecord
      Arguments:
        domainId: '3150401'
        id: '14950401'
  myWwwRecord:
    fn::invoke:
      Function: linode:getDomainRecord
      Arguments:
        domainId: '3150401'
        name: www

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 dictionary

The following arguments are supported:

DomainId int

The associated domain's unique ID.

Id int

The unique ID of the Domain Record.

Name string

The name of the Record.

DomainId int

The associated domain's unique ID.

Id int

The unique ID of the Domain Record.

Name string

The name of the Record.

domainId Integer

The associated domain's unique ID.

id Integer

The unique ID of the Domain Record.

name String

The name of the Record.

domainId number

The associated domain's unique ID.

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.

id int

The unique ID of the Domain Record.

name str

The name of the Record.

domainId Number

The associated domain's unique ID.

id Number

The unique ID of the Domain Record.

name String

The name of the Record.

getDomainRecord Result

The following output properties are available:

DomainId 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.

TtlSec 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.

DomainId 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.

TtlSec 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.

domainId 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.

ttlSec 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.

domainId 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.

ttlSec 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.

domainId 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.

ttlSec 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 linode Terraform Provider.