NS1 v3.5.3 published on Saturday, Mar 8, 2025 by Pulumi
ns1.getRecord
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as ns1 from "@pulumi/ns1";
// Get details about a NS1 Record.
const example = ns1.getRecord({
    zone: "example.io",
    domain: "terraform.example.io",
    type: "A",
});
import pulumi
import pulumi_ns1 as ns1
# Get details about a NS1 Record.
example = ns1.get_record(zone="example.io",
    domain="terraform.example.io",
    type="A")
package main
import (
	"github.com/pulumi/pulumi-ns1/sdk/v3/go/ns1"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Get details about a NS1 Record.
		_, err := ns1.LookupRecord(ctx, &ns1.LookupRecordArgs{
			Zone:   "example.io",
			Domain: "terraform.example.io",
			Type:   "A",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ns1 = Pulumi.Ns1;
return await Deployment.RunAsync(() => 
{
    // Get details about a NS1 Record.
    var example = Ns1.GetRecord.Invoke(new()
    {
        Zone = "example.io",
        Domain = "terraform.example.io",
        Type = "A",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ns1.Ns1Functions;
import com.pulumi.ns1.inputs.GetRecordArgs;
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) {
        // Get details about a NS1 Record.
        final var example = Ns1Functions.getRecord(GetRecordArgs.builder()
            .zone("example.io")
            .domain("terraform.example.io")
            .type("A")
            .build());
    }
}
variables:
  # Get details about a NS1 Record.
  example:
    fn::invoke:
      function: ns1:getRecord
      arguments:
        zone: example.io
        domain: terraform.example.io
        type: A
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)
}public static CompletableFuture<GetRecordResult> getRecord(GetRecordArgs args, InvokeOptions options)
public static Output<GetRecordResult> getRecord(GetRecordArgs args, InvokeOptions options)
fn::invoke:
  function: ns1:index/getRecord:getRecord
  arguments:
    # arguments dictionaryThe following arguments are supported:
getRecord Result
The following output properties are available:
- Answers
List<GetRecord Answer> 
- List of NS1 answers.
- Domain string
- Filters
List<GetRecord Filter> 
- 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, string>
- Map of metadata
- OverrideAddress boolRecords 
- OverrideTtl bool
- Regions
List<GetRecord Region> 
- List of regions.
- ShortAnswers List<string>
- Dictionary<string, string>
- Ttl int
- The records' time to live (in seconds).
- Type string
- UseClient boolSubnet 
- Whether to use EDNS client subnet data when available (in filter chain).
- Zone string
- Answers
[]GetRecord Answer 
- List of NS1 answers.
- Domain string
- Filters
[]GetRecord Filter 
- 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]string
- Map of metadata
- OverrideAddress boolRecords 
- OverrideTtl bool
- Regions
[]GetRecord Region 
- List of regions.
- ShortAnswers []string
- map[string]string
- Ttl int
- The records' time to live (in seconds).
- Type string
- UseClient boolSubnet 
- Whether to use EDNS client subnet data when available (in filter chain).
- Zone string
- answers
List<GetRecord Answer> 
- List of NS1 answers.
- domain String
- filters
List<GetRecord Filter> 
- 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,String>
- Map of metadata
- overrideAddress BooleanRecords 
- overrideTtl Boolean
- regions
List<GetRecord Region> 
- List of regions.
- shortAnswers List<String>
- Map<String,String>
- ttl Integer
- The records' time to live (in seconds).
- type String
- useClient BooleanSubnet 
- Whether to use EDNS client subnet data when available (in filter chain).
- zone String
- answers
GetRecord Answer[] 
- List of NS1 answers.
- domain string
- filters
GetRecord Filter[] 
- 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]: string}
- Map of metadata
- overrideAddress booleanRecords 
- overrideTtl boolean
- regions
GetRecord Region[] 
- List of regions.
- shortAnswers string[]
- {[key: string]: string}
- ttl number
- The records' time to live (in seconds).
- type string
- useClient booleanSubnet 
- Whether to use EDNS client subnet data when available (in filter chain).
- zone string
- answers
Sequence[GetRecord Answer] 
- List of NS1 answers.
- domain str
- filters
Sequence[GetRecord Filter] 
- 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, str]
- Map of metadata
- override_address_ boolrecords 
- override_ttl bool
- regions
Sequence[GetRecord Region] 
- List of regions.
- short_answers Sequence[str]
- Mapping[str, str]
- ttl int
- The records' time to live (in seconds).
- type str
- use_client_ boolsubnet 
- Whether to use EDNS client subnet data when available (in filter chain).
- zone str
- answers List<Property Map>
- List of NS1 answers.
- domain String
- filters List<Property Map>
- 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>
- Map of metadata
- overrideAddress BooleanRecords 
- overrideTtl Boolean
- regions List<Property Map>
- List of regions.
- shortAnswers List<String>
- Map<String>
- ttl Number
- The records' time to live (in seconds).
- type String
- useClient BooleanSubnet 
- Whether to use EDNS client subnet data when available (in filter chain).
- zone String
Supporting Types
GetRecordAnswer  
GetRecordFilter  
GetRecordRegion  
Package Details
- Repository
- NS1 pulumi/pulumi-ns1
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ns1Terraform Provider.