NS1 v3.4.6 published on Friday, Oct 18, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: ns1:index/getRecord:getRecord
arguments:
# arguments dictionary
The following arguments are supported:
getRecord Result
The following output properties are available:
- Answers
List<Get
Record Answer> - List of NS1 answers.
- Domain string
- Filters
List<Get
Record 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
- Override
Address boolRecords - Override
Ttl bool - Regions
List<Get
Record Region> - List of regions.
- Short
Answers List<string> - Dictionary<string, string>
- Ttl int
- The records' time to live (in seconds).
- Type string
- Use
Client boolSubnet - Whether to use EDNS client subnet data when available (in filter chain).
- Zone string
- Answers
[]Get
Record Answer - List of NS1 answers.
- Domain string
- Filters
[]Get
Record 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
- Override
Address boolRecords - Override
Ttl bool - Regions
[]Get
Record Region - List of regions.
- Short
Answers []string - map[string]string
- Ttl int
- The records' time to live (in seconds).
- Type string
- Use
Client boolSubnet - Whether to use EDNS client subnet data when available (in filter chain).
- Zone string
- answers
List<Get
Record Answer> - List of NS1 answers.
- domain String
- filters
List<Get
Record 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
- override
Address BooleanRecords - override
Ttl Boolean - regions
List<Get
Record Region> - List of regions.
- short
Answers List<String> - Map<String,String>
- ttl Integer
- The records' time to live (in seconds).
- type String
- use
Client BooleanSubnet - Whether to use EDNS client subnet data when available (in filter chain).
- zone String
- answers
Get
Record Answer[] - List of NS1 answers.
- domain string
- filters
Get
Record 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
- override
Address booleanRecords - override
Ttl boolean - regions
Get
Record Region[] - List of regions.
- short
Answers string[] - {[key: string]: string}
- ttl number
- The records' time to live (in seconds).
- type string
- use
Client booleanSubnet - Whether to use EDNS client subnet data when available (in filter chain).
- zone string
- answers
Sequence[Get
Record Answer] - List of NS1 answers.
- domain str
- filters
Sequence[Get
Record 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[Get
Record 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
- override
Address BooleanRecords - override
Ttl Boolean - regions List<Property Map>
- List of regions.
- short
Answers List<String> - Map<String>
- ttl Number
- The records' time to live (in seconds).
- type String
- use
Client 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
ns1
Terraform Provider.