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

Record

Provides a NS1 Record resource. This can be used to create, modify, and delete records.

NS1 Documentation

Record Api Doc

Create a Record Resource

new Record(name: string, args: RecordArgs, opts?: CustomResourceOptions);
@overload
def Record(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           answers: Optional[Sequence[RecordAnswerArgs]] = None,
           domain: Optional[str] = None,
           filters: Optional[Sequence[RecordFilterArgs]] = None,
           link: Optional[str] = None,
           meta: Optional[Mapping[str, Any]] = None,
           regions: Optional[Sequence[RecordRegionArgs]] = None,
           short_answers: Optional[Sequence[str]] = None,
           ttl: Optional[int] = None,
           type: Optional[str] = None,
           use_client_subnet: Optional[bool] = None,
           zone: Optional[str] = None)
@overload
def Record(resource_name: str,
           args: RecordArgs,
           opts: Optional[ResourceOptions] = None)
func NewRecord(ctx *Context, name string, args RecordArgs, opts ...ResourceOption) (*Record, error)
public Record(string name, RecordArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args RecordArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args RecordArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args RecordArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RecordArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Record Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Record resource accepts the following input properties:

Domain string
The records' domain. Cannot have leading or trailing dots - see the example above and FQDN formatting below.
Type string
The records' RR type.
Zone string
The zone the record belongs to. Cannot have leading or trailing dots (".") - see the example above and FQDN formatting below.
Answers List<RecordAnswerArgs>
One or more NS1 answers for the records' specified type. Answers are documented below.
Filters List<RecordFilterArgs>
One or more NS1 filters for the record(order matters). Filters are documented below.
Link string
The target record to link to. This means this record is a ‘linked’ record, and it inherits all properties from its target.
Meta Dictionary<string, object>
Regions List<RecordRegionArgs>
One or more “regions” for the record. These are really just groupings based on metadata, and are called “Answer Groups” in the NS1 UI, but remain regions here for legacy reasons. Regions are documented below. Please note the ordering requirement!
ShortAnswers List<string>

Deprecated: short_answers will be deprecated in a future release. It is suggested to migrate to a regular "answers" block.

Ttl int
The records' time to live (in seconds).
UseClientSubnet bool

Whether to use EDNS client subnet data when available(in filter chain).

  • meta - (Optional) meta is supported at the record level. Meta is documented below.
Domain string
The records' domain. Cannot have leading or trailing dots - see the example above and FQDN formatting below.
Type string
The records' RR type.
Zone string
The zone the record belongs to. Cannot have leading or trailing dots (".") - see the example above and FQDN formatting below.
Answers []RecordAnswerArgs
One or more NS1 answers for the records' specified type. Answers are documented below.
Filters []RecordFilterArgs
One or more NS1 filters for the record(order matters). Filters are documented below.
Link string
The target record to link to. This means this record is a ‘linked’ record, and it inherits all properties from its target.
Meta map[string]interface{}
Regions []RecordRegionArgs
One or more “regions” for the record. These are really just groupings based on metadata, and are called “Answer Groups” in the NS1 UI, but remain regions here for legacy reasons. Regions are documented below. Please note the ordering requirement!
ShortAnswers []string

Deprecated: short_answers will be deprecated in a future release. It is suggested to migrate to a regular "answers" block.

Ttl int
The records' time to live (in seconds).
UseClientSubnet bool

Whether to use EDNS client subnet data when available(in filter chain).

  • meta - (Optional) meta is supported at the record level. Meta is documented below.
domain string
The records' domain. Cannot have leading or trailing dots - see the example above and FQDN formatting below.
type string
The records' RR type.
zone string
The zone the record belongs to. Cannot have leading or trailing dots (".") - see the example above and FQDN formatting below.
answers RecordAnswerArgs[]
One or more NS1 answers for the records' specified type. Answers are documented below.
filters RecordFilterArgs[]
One or more NS1 filters for the record(order matters). Filters are documented below.
link string
The target record to link to. This means this record is a ‘linked’ record, and it inherits all properties from its target.
meta {[key: string]: any}
regions RecordRegionArgs[]
One or more “regions” for the record. These are really just groupings based on metadata, and are called “Answer Groups” in the NS1 UI, but remain regions here for legacy reasons. Regions are documented below. Please note the ordering requirement!
shortAnswers string[]

Deprecated: short_answers will be deprecated in a future release. It is suggested to migrate to a regular "answers" block.

ttl number
The records' time to live (in seconds).
useClientSubnet boolean

Whether to use EDNS client subnet data when available(in filter chain).

  • meta - (Optional) meta is supported at the record level. Meta is documented below.
domain str
The records' domain. Cannot have leading or trailing dots - see the example above and FQDN formatting below.
type str
The records' RR type.
zone str
The zone the record belongs to. Cannot have leading or trailing dots (".") - see the example above and FQDN formatting below.
answers Sequence[RecordAnswerArgs]
One or more NS1 answers for the records' specified type. Answers are documented below.
filters Sequence[RecordFilterArgs]
One or more NS1 filters for the record(order matters). Filters are documented below.
link str
The target record to link to. This means this record is a ‘linked’ record, and it inherits all properties from its target.
meta Mapping[str, Any]
regions Sequence[RecordRegionArgs]
One or more “regions” for the record. These are really just groupings based on metadata, and are called “Answer Groups” in the NS1 UI, but remain regions here for legacy reasons. Regions are documented below. Please note the ordering requirement!
short_answers Sequence[str]

Deprecated: short_answers will be deprecated in a future release. It is suggested to migrate to a regular "answers" block.

ttl int
The records' time to live (in seconds).
use_client_subnet bool

Whether to use EDNS client subnet data when available(in filter chain).

  • meta - (Optional) meta is supported at the record level. Meta is documented below.

Outputs

All input properties are implicitly available as output properties. Additionally, the Record resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Record Resource

Get an existing Record resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: RecordState, opts?: CustomResourceOptions): Record
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        answers: Optional[Sequence[RecordAnswerArgs]] = None,
        domain: Optional[str] = None,
        filters: Optional[Sequence[RecordFilterArgs]] = None,
        link: Optional[str] = None,
        meta: Optional[Mapping[str, Any]] = None,
        regions: Optional[Sequence[RecordRegionArgs]] = None,
        short_answers: Optional[Sequence[str]] = None,
        ttl: Optional[int] = None,
        type: Optional[str] = None,
        use_client_subnet: Optional[bool] = None,
        zone: Optional[str] = None) -> Record
func GetRecord(ctx *Context, name string, id IDInput, state *RecordState, opts ...ResourceOption) (*Record, error)
public static Record Get(string name, Input<string> id, RecordState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Answers List<RecordAnswerArgs>
One or more NS1 answers for the records' specified type. Answers are documented below.
Domain string
The records' domain. Cannot have leading or trailing dots - see the example above and FQDN formatting below.
Filters List<RecordFilterArgs>
One or more NS1 filters for the record(order matters). Filters are documented below.
Link string
The target record to link to. This means this record is a ‘linked’ record, and it inherits all properties from its target.
Meta Dictionary<string, object>
Regions List<RecordRegionArgs>
One or more “regions” for the record. These are really just groupings based on metadata, and are called “Answer Groups” in the NS1 UI, but remain regions here for legacy reasons. Regions are documented below. Please note the ordering requirement!
ShortAnswers List<string>

Deprecated: short_answers will be deprecated in a future release. It is suggested to migrate to a regular "answers" block.

Ttl int
The records' time to live (in seconds).
Type string
The records' RR type.
UseClientSubnet bool

Whether to use EDNS client subnet data when available(in filter chain).

  • meta - (Optional) meta is supported at the record level. Meta is documented below.
Zone string
The zone the record belongs to. Cannot have leading or trailing dots (".") - see the example above and FQDN formatting below.
Answers []RecordAnswerArgs
One or more NS1 answers for the records' specified type. Answers are documented below.
Domain string
The records' domain. Cannot have leading or trailing dots - see the example above and FQDN formatting below.
Filters []RecordFilterArgs
One or more NS1 filters for the record(order matters). Filters are documented below.
Link string
The target record to link to. This means this record is a ‘linked’ record, and it inherits all properties from its target.
Meta map[string]interface{}
Regions []RecordRegionArgs
One or more “regions” for the record. These are really just groupings based on metadata, and are called “Answer Groups” in the NS1 UI, but remain regions here for legacy reasons. Regions are documented below. Please note the ordering requirement!
ShortAnswers []string

Deprecated: short_answers will be deprecated in a future release. It is suggested to migrate to a regular "answers" block.

Ttl int
The records' time to live (in seconds).
Type string
The records' RR type.
UseClientSubnet bool

Whether to use EDNS client subnet data when available(in filter chain).

  • meta - (Optional) meta is supported at the record level. Meta is documented below.
Zone string
The zone the record belongs to. Cannot have leading or trailing dots (".") - see the example above and FQDN formatting below.
answers RecordAnswerArgs[]
One or more NS1 answers for the records' specified type. Answers are documented below.
domain string
The records' domain. Cannot have leading or trailing dots - see the example above and FQDN formatting below.
filters RecordFilterArgs[]
One or more NS1 filters for the record(order matters). Filters are documented below.
link string
The target record to link to. This means this record is a ‘linked’ record, and it inherits all properties from its target.
meta {[key: string]: any}
regions RecordRegionArgs[]
One or more “regions” for the record. These are really just groupings based on metadata, and are called “Answer Groups” in the NS1 UI, but remain regions here for legacy reasons. Regions are documented below. Please note the ordering requirement!
shortAnswers string[]

Deprecated: short_answers will be deprecated in a future release. It is suggested to migrate to a regular "answers" block.

ttl number
The records' time to live (in seconds).
type string
The records' RR type.
useClientSubnet boolean

Whether to use EDNS client subnet data when available(in filter chain).

  • meta - (Optional) meta is supported at the record level. Meta is documented below.
zone string
The zone the record belongs to. Cannot have leading or trailing dots (".") - see the example above and FQDN formatting below.
answers Sequence[RecordAnswerArgs]
One or more NS1 answers for the records' specified type. Answers are documented below.
domain str
The records' domain. Cannot have leading or trailing dots - see the example above and FQDN formatting below.
filters Sequence[RecordFilterArgs]
One or more NS1 filters for the record(order matters). Filters are documented below.
link str
The target record to link to. This means this record is a ‘linked’ record, and it inherits all properties from its target.
meta Mapping[str, Any]
regions Sequence[RecordRegionArgs]
One or more “regions” for the record. These are really just groupings based on metadata, and are called “Answer Groups” in the NS1 UI, but remain regions here for legacy reasons. Regions are documented below. Please note the ordering requirement!
short_answers Sequence[str]

Deprecated: short_answers will be deprecated in a future release. It is suggested to migrate to a regular "answers" block.

ttl int
The records' time to live (in seconds).
type str
The records' RR type.
use_client_subnet bool

Whether to use EDNS client subnet data when available(in filter chain).

  • meta - (Optional) meta is supported at the record level. Meta is documented below.
zone str
The zone the record belongs to. Cannot have leading or trailing dots (".") - see the example above and FQDN formatting below.

Supporting Types

RecordAnswer

Answer string
Space delimited string of RDATA fields dependent on the record type.
Meta Dictionary<string, object>
Region string

The region (Answer Group really) that this answer belongs to. This should be one of the names specified in regions. Only a single region per answer is currently supported. If you want an answer in multiple regions, duplicating the answer (including metadata) is the correct approach.

  • meta - (Optional) meta is supported at the answer level. Meta is documented below.
Answer string
Space delimited string of RDATA fields dependent on the record type.
Meta map[string]interface{}
Region string

The region (Answer Group really) that this answer belongs to. This should be one of the names specified in regions. Only a single region per answer is currently supported. If you want an answer in multiple regions, duplicating the answer (including metadata) is the correct approach.

  • meta - (Optional) meta is supported at the answer level. Meta is documented below.
answer string
Space delimited string of RDATA fields dependent on the record type.
meta {[key: string]: any}
region string

The region (Answer Group really) that this answer belongs to. This should be one of the names specified in regions. Only a single region per answer is currently supported. If you want an answer in multiple regions, duplicating the answer (including metadata) is the correct approach.

  • meta - (Optional) meta is supported at the answer level. Meta is documented below.
answer str
Space delimited string of RDATA fields dependent on the record type.
meta Mapping[str, Any]
region str

The region (Answer Group really) that this answer belongs to. This should be one of the names specified in regions. Only a single region per answer is currently supported. If you want an answer in multiple regions, duplicating the answer (including metadata) is the correct approach.

  • meta - (Optional) meta is supported at the answer level. Meta is documented below.

RecordFilter

Filter string
The type of filter.
Config Dictionary<string, object>
The filters' configuration. Simple key/value pairs determined by the filter type.
Disabled bool
Determines whether the filter is applied in the filter chain.
Filter string
The type of filter.
Config map[string]interface{}
The filters' configuration. Simple key/value pairs determined by the filter type.
Disabled bool
Determines whether the filter is applied in the filter chain.
filter string
The type of filter.
config {[key: string]: any}
The filters' configuration. Simple key/value pairs determined by the filter type.
disabled boolean
Determines whether the filter is applied in the filter chain.
filter str
The type of filter.
config Mapping[str, Any]
The filters' configuration. Simple key/value pairs determined by the filter type.
disabled bool
Determines whether the filter is applied in the filter chain.

RecordRegion

Name string
Name of the region (or Answer Group).
Meta Dictionary<string, object>
Name string
Name of the region (or Answer Group).
Meta map[string]interface{}
name string
Name of the region (or Answer Group).
meta {[key: string]: any}
name str
Name of the region (or Answer Group).
meta Mapping[str, Any]

Import

 $ pulumi import ns1:index/record:Record <name> <zone>/<domain>/<type>`

So for the example above

 $ pulumi import ns1:index/record:Record www terraform.example.io/www.terraform.example.io/CNAME`

Package Details

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