Linode

Pulumi Official
Package maintained by Pulumi
v3.10.0 published on Tuesday, Aug 16, 2022 by Pulumi

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. See all record types here.

  • 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 System.Collections.Generic;
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/v3/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := linode.LookupDomainRecord(ctx, &GetDomainRecordArgs{
			DomainId: 3150401,
			Id:       pulumi.IntRef(14950401),
		}, nil)
		if err != nil {
			return err
		}
		_, err = linode.LookupDomainRecord(ctx, &GetDomainRecordArgs{
			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 = pulumi.output(linode.getDomainRecord({
    domainId: 3150401,
    id: 14950401,
}));
const myWwwRecord = pulumi.output(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
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 Integer
port Integer
priority Integer
protocol String
service String
tag String
target String
ttlSec Integer
type String
weight Integer
id Integer
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
domainId Number
port Number
priority Number
protocol String
service String
tag String
target String
ttlSec Number
type String
weight Number
id Number
name String

Package Details

Repository
https://github.com/pulumi/pulumi-linode
License
Apache-2.0
Notes

This Pulumi package is based on the linode Terraform Provider.