Get started with Pulumi in a free one hour introductory workshop. Register Now

GetDomainRecord

Provides information about a Linode Domain Record.

Attributes

The Linode Volume resource exports the following attributes:

  • id - The unique ID of the Domain Record.

  • name - The name of the Record.

  • domain_id - The associated domain’s unique ID.

  • type - The type of Record this is in the DNS system.

  • ttl_sec - The amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers.

  • target - 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.

  • priority - The priority of the target host. Lower values are preferred.

  • weight - The relative weight of this Record. Higher values are preferred.

  • port - The port this Record points to.

  • protocol - The protocol this Record’s service communicates with. Only valid for SRV records.

  • service - The service this Record identified. Only valid for SRV records.

  • tag - The tag portion of a CAA record.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var myRecord = Output.Create(Linode.GetDomainRecord.InvokeAsync(new Linode.GetDomainRecordArgs
        {
            DomainId = 3150401,
            Id = 14950401,
        }));
        var myWwwRecord = Output.Create(Linode.GetDomainRecord.InvokeAsync(new Linode.GetDomainRecordArgs
        {
            DomainId = 3150401,
            Name = "www",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-linode/sdk/v2/go/linode"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := 14950401
        _, err := linode.LookupDomainRecord(ctx, &linode.LookupDomainRecordArgs{
            DomainId: 3150401,
            Id:       &opt0,
        }, nil)
        if err != nil {
            return err
        }
        opt1 := "www"
        _, err = linode.LookupDomainRecord(ctx, &linode.LookupDomainRecordArgs{
            DomainId: 3150401,
            Name:     &opt1,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
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 = pulumi.output(linode.getDomainRecord({
    domainId: 3150401,
    id: 14950401,
}, { async: true }));
const myWwwRecord = pulumi.output(linode.getDomainRecord({
    domainId: 3150401,
    name: "www",
}, { async: true }));

Using GetDomainRecord

function getDomainRecord(args: GetDomainRecordArgs, opts?: InvokeOptions): Promise<GetDomainRecordResult>
def get_domain_record(domain_id: Optional[int] = None, id: Optional[int] = None, name: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetDomainRecordResult
func LookupDomainRecord(ctx *Context, args *LookupDomainRecordArgs, opts ...InvokeOption) (*LookupDomainRecordResult, error)

Note: This function is named LookupDomainRecord in the Go SDK.

public static class GetDomainRecord {
    public static Task<GetDomainRecordResult> InvokeAsync(GetDomainRecordArgs args, InvokeOptions? opts = null)
}

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

GetDomainRecord Result

The following output properties are available:

DomainId int
Port int
Priority int
Protocol string
Service string
Tag string
Target string
TtlSec int
Type string
Weight int
Id int
Name string
DomainId int
Port int
Priority int
Protocol string
Service string
Tag string
Target string
TtlSec int
Type string
Weight int
Id int
Name string
domainId number
port number
priority number
protocol string
service string
tag string
target string
ttlSec number
type string
weight number
id number
name string
domain_id int
port int
priority int
protocol str
service str
tag str
target str
ttl_sec int
type str
weight int
id int
name str

Package Details

Repository
https://github.com/pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.