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
using System.Collections.Generic;
using Pulumi;
using Ns1 = Pulumi.Ns1;
return await Deployment.RunAsync(() =>
{
var example = Ns1.GetRecord.Invoke(new()
{
Domain = "terraform.example.io",
Type = "A",
Zone = "example.io",
});
});
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 {
_, err := ns1.LookupRecord(ctx, &ns1.LookupRecordArgs{
Domain: "terraform.example.io",
Type: "A",
Zone: "example.io",
}, 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.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) {
final var example = Ns1Functions.getRecord(GetRecordArgs.builder()
.domain("terraform.example.io")
.type("A")
.zone("example.io")
.build());
}
}
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";
const example = ns1.getRecord({
domain: "terraform.example.io",
type: "A",
zone: "example.io",
});
variables:
example:
fn::invoke:
Function: ns1:getRecord
Arguments:
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)
}
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, object>
Map of metadata
- Override
Ttl bool - Regions
List<Get
Record Region> List of regions.
- Short
Answers List<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]interface{}
Map of metadata
- Override
Ttl bool - Regions
[]Get
Record Region List of regions.
- Short
Answers []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,Object>
Map of metadata
- override
Ttl Boolean - regions
List<Get
Record Region> List of regions.
- short
Answers List<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]: any}
Map of metadata
- override
Ttl boolean - regions
Get
Record Region[] List of regions.
- short
Answers 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, Any]
Map of metadata
- override_
ttl bool - regions
Sequence[Get
Record Region] List of regions.
- short_
answers Sequence[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<Any>
Map of metadata
- override
Ttl Boolean - regions List<Property Map>
List of regions.
- short
Answers List<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.