ns1.Record
Explore with Pulumi AI
Provides a NS1 Record resource. This can be used to create, modify, and delete records.
NS1 Documentation
Create 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,
override_ttl: Optional[bool] = 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)
public Record(String name, RecordArgs args)
public Record(String name, RecordArgs args, CustomResourceOptions options)
type: ns1:Record
properties: # The arguments to resource properties.
options: # 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.
- 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.
- name String
- The unique name of the resource.
- args RecordArgs
- The arguments to resource properties.
- options 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<Record
Answer Args> One or more NS1 answers for the records' specified type. Answers are documented below.
- Filters
List<Record
Filter Args> 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>
- Override
Ttl bool - Regions
List<Record
Region Args> 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 List<string> 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 boolSubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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
[]Record
Answer Args One or more NS1 answers for the records' specified type. Answers are documented below.
- Filters
[]Record
Filter Args 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{}
- Override
Ttl bool - Regions
[]Record
Region Args 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 []string 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 boolSubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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
List<Record
Answer Args> One or more NS1 answers for the records' specified type. Answers are documented below.
- filters
List<Record
Filter Args> 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,Object>
- override
Ttl Boolean - regions
List<Record
Region Args> 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 List<String> short_answers will be deprecated in a future release. It is suggested to migrate to a regular "answers" block.
- ttl Integer
The records' time to live (in seconds).
- use
Client BooleanSubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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
Record
Answer Args[] One or more NS1 answers for the records' specified type. Answers are documented below.
- filters
Record
Filter Args[] 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}
- override
Ttl boolean - regions
Record
Region Args[] 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 string[] 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).
- use
Client booleanSubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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[Record
Answer Args] One or more NS1 answers for the records' specified type. Answers are documented below.
- filters
Sequence[Record
Filter Args] 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]
- override_
ttl bool - regions
Sequence[Record
Region Args] 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] 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_ boolsubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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 List<Property Map>
One or more NS1 answers for the records' specified type. Answers are documented below.
- filters List<Property Map>
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<Any>
- override
Ttl Boolean - regions List<Property Map>
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 List<String> 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).
- use
Client BooleanSubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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 string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up 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,
override_ttl: Optional[bool] = 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)
public static Record get(String name, Output<String> id, RecordState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Answers
List<Record
Answer Args> 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<Record
Filter Args> 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>
- Override
Ttl bool - Regions
List<Record
Region Args> 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 List<string> 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.
- Use
Client boolSubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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
[]Record
Answer Args 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
[]Record
Filter Args 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{}
- Override
Ttl bool - Regions
[]Record
Region Args 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 []string 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.
- Use
Client boolSubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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
List<Record
Answer Args> 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<Record
Filter Args> 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,Object>
- override
Ttl Boolean - regions
List<Record
Region Args> 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 List<String> short_answers will be deprecated in a future release. It is suggested to migrate to a regular "answers" block.
- ttl Integer
The records' time to live (in seconds).
- type String
The records' RR type.
- use
Client BooleanSubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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
Record
Answer Args[] 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
Record
Filter Args[] 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}
- override
Ttl boolean - regions
Record
Region Args[] 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 string[] 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.
- use
Client booleanSubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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[Record
Answer Args] 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[Record
Filter Args] 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]
- override_
ttl bool - regions
Sequence[Record
Region Args] 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] 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_ boolsubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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.
- answers List<Property Map>
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<Property Map>
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<Any>
- override
Ttl Boolean - regions List<Property Map>
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 List<String> 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.
- use
Client BooleanSubnet Whether to use EDNS client subnet data when available(in filter chain).
meta
- (Optional) meta is supported at therecord
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.
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 singleregion
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 theanswer
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 singleregion
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 theanswer
level. Meta is documented below.
- answer String
Space delimited string of RDATA fields dependent on the record type.
- meta Map<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 singleregion
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 theanswer
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 singleregion
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 theanswer
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 singleregion
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 theanswer
level. Meta is documented below.
- answer String
Space delimited string of RDATA fields dependent on the record type.
- meta Map<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 singleregion
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 theanswer
level. Meta is documented below.
RecordFilter
RecordRegion
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
- NS1 pulumi/pulumi-ns1
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
ns1
Terraform Provider.