1. Packages
  2. NS1
  3. API Docs
  4. getRecord
NS1 v3.3.0 published on Monday, Jun 24, 2024 by Pulumi

ns1.getRecord

Explore with Pulumi AI

ns1 logo
NS1 v3.3.0 published on Monday, Jun 24, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ns1:index/getRecord:getRecord
      arguments:
        # arguments dictionary

    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 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.
    domain String
    The records' domain.
    type String
    The records' RR type.
    zone String
    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
    OverrideTtl bool
    Regions List<GetRecordRegion>
    List of regions.
    ShortAnswers List<string>
    Tags Dictionary<string, object>
    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
    OverrideTtl bool
    Regions []GetRecordRegion
    List of regions.
    ShortAnswers []string
    Tags map[string]interface{}
    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 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 Map<String,Object>
    Map of metadata
    overrideTtl Boolean
    regions List<GetRecordRegion>
    List of regions.
    shortAnswers List<String>
    tags Map<String,Object>
    ttl Integer
    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 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
    overrideTtl boolean
    regions GetRecordRegion[]
    List of regions.
    shortAnswers string[]
    tags {[key: string]: any}
    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
    override_ttl bool
    regions Sequence[GetRecordRegion]
    List of regions.
    short_answers Sequence[str]
    tags Mapping[str, Any]
    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
    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<Any>
    Map of metadata
    overrideTtl Boolean
    regions List<Property Map>
    List of regions.
    shortAnswers List<String>
    tags Map<Any>
    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

    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 Map<String,Object>
    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
    answer String
    meta Map<Any>
    Map of metadata
    region String

    GetRecordFilter

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

    GetRecordRegion

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

    Package Details

    Repository
    NS1 pulumi/pulumi-ns1
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ns1 Terraform Provider.
    ns1 logo
    NS1 v3.3.0 published on Monday, Jun 24, 2024 by Pulumi