Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

getRecord

Provides details about a NS1 Record. Use this if you would simply like to read information from NS1 into your configurations. For read/write operations, you should use a resource.

Example Usage

using Pulumi;
using Ns1 = Pulumi.Ns1;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Ns1.GetRecord.InvokeAsync(new Ns1.GetRecordArgs
        {
            Domain = "terraform.example.io",
            Type = "A",
            Zone = "example.io",
        }));
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ns1.LookupRecord(ctx, &GetRecordArgs{
			Domain: "terraform.example.io",
			Type:   "A",
			Zone:   "example.io",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_ns1 as ns1

example = ns1.get_record(domain="terraform.example.io",
    type="A",
    zone="example.io")
import * as pulumi from "@pulumi/pulumi";
import * as ns1 from "@pulumi/ns1";

// Get details about a NS1 Record.
const example = pulumi.output(ns1.getRecord({
    domain: "terraform.example.io",
    type: "A",
    zone: "example.io",
}));

Using getRecord

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 getRecord(args: GetRecordArgs, opts?: InvokeOptions): Promise<GetRecordResult>
function getRecordOutput(args: GetRecordOutputArgs, opts?: InvokeOptions): Output<GetRecordResult>
def get_record(domain: Optional[str] = None,
               type: Optional[str] = None,
               zone: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetRecordResult
def get_record_output(domain: Optional[pulumi.Input[str]] = None,
               type: Optional[pulumi.Input[str]] = None,
               zone: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetRecordResult]
func LookupRecord(ctx *Context, args *LookupRecordArgs, opts ...InvokeOption) (*LookupRecordResult, error)
func LookupRecordOutput(ctx *Context, args *LookupRecordOutputArgs, opts ...InvokeOption) LookupRecordResultOutput

> Note: This function is named LookupRecord in the Go SDK.

public static class GetRecord 
{
    public static Task<GetRecordResult> InvokeAsync(GetRecordArgs args, InvokeOptions? opts = null)
    public static Output<GetRecordResult> Invoke(GetRecordInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Domain string
The records' domain.
Type string
The records' RR type.
Zone string
The zone the record belongs to.
Domain string
The records' domain.
Type string
The records' RR type.
Zone string
The zone the record belongs to.
domain string
The records' domain.
type string
The records' RR type.
zone string
The zone the record belongs to.
domain str
The records' domain.
type str
The records' RR type.
zone str
The zone the record belongs to.

getRecord Result

The following output properties are available:

Answers List<GetRecordAnswer>
List of NS1 answers.
Domain string
Filters List<GetRecordFilter>
List of NS1 filters.
Id string
The provider-assigned unique ID for this managed resource.
Link string
The target record this links to.
Meta Dictionary<string, object>
Map of metadata
Regions List<GetRecordRegion>
List of regions.
ShortAnswers List<string>
Ttl int
The records' time to live (in seconds).
Type string
UseClientSubnet bool
Whether to use EDNS client subnet data when available (in filter chain).
Zone string
Answers []GetRecordAnswer
List of NS1 answers.
Domain string
Filters []GetRecordFilter
List of NS1 filters.
Id string
The provider-assigned unique ID for this managed resource.
Link string
The target record this links to.
Meta map[string]interface{}
Map of metadata
Regions []GetRecordRegion
List of regions.
ShortAnswers []string
Ttl int
The records' time to live (in seconds).
Type string
UseClientSubnet bool
Whether to use EDNS client subnet data when available (in filter chain).
Zone string
answers GetRecordAnswer[]
List of NS1 answers.
domain string
filters GetRecordFilter[]
List of NS1 filters.
id string
The provider-assigned unique ID for this managed resource.
link string
The target record this links to.
meta {[key: string]: any}
Map of metadata
regions GetRecordRegion[]
List of regions.
shortAnswers string[]
ttl number
The records' time to live (in seconds).
type string
useClientSubnet boolean
Whether to use EDNS client subnet data when available (in filter chain).
zone string
answers Sequence[GetRecordAnswer]
List of NS1 answers.
domain str
filters Sequence[GetRecordFilter]
List of NS1 filters.
id str
The provider-assigned unique ID for this managed resource.
link str
The target record this links to.
meta Mapping[str, Any]
Map of metadata
regions Sequence[GetRecordRegion]
List of regions.
short_answers Sequence[str]
ttl int
The records' time to live (in seconds).
type str
use_client_subnet bool
Whether to use EDNS client subnet data when available (in filter chain).
zone str

Supporting Types

GetRecordAnswer

Answer string
Meta Dictionary<string, object>
Map of metadata
Region string
Answer string
Meta map[string]interface{}
Map of metadata
Region string
answer string
meta {[key: string]: any}
Map of metadata
region string
answer str
meta Mapping[str, Any]
Map of metadata
region str

GetRecordFilter

Config Dictionary<string, object>
Disabled bool
Filter string
Config map[string]interface{}
Disabled bool
Filter string
config {[key: string]: any}
disabled boolean
filter string
config Mapping[str, Any]
disabled bool
filter str

GetRecordRegion

Meta Dictionary<string, object>
Map of metadata
Name string
Meta map[string]interface{}
Map of metadata
Name string
meta {[key: string]: any}
Map of metadata
name string
meta Mapping[str, Any]
Map of metadata
name str

Package Details

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