vercel.DnsRecord
Explore with Pulumi AI
Create DnsRecord Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DnsRecord(name: string, args: DnsRecordArgs, opts?: CustomResourceOptions);
@overload
def DnsRecord(resource_name: str,
args: DnsRecordArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DnsRecord(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
type: Optional[str] = None,
comment: Optional[str] = None,
mx_priority: Optional[int] = None,
name: Optional[str] = None,
srv: Optional[DnsRecordSrvArgs] = None,
team_id: Optional[str] = None,
ttl: Optional[int] = None,
value: Optional[str] = None)
func NewDnsRecord(ctx *Context, name string, args DnsRecordArgs, opts ...ResourceOption) (*DnsRecord, error)
public DnsRecord(string name, DnsRecordArgs args, CustomResourceOptions? opts = null)
public DnsRecord(String name, DnsRecordArgs args)
public DnsRecord(String name, DnsRecordArgs args, CustomResourceOptions options)
type: vercel:DnsRecord
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DnsRecordArgs
- 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 DnsRecordArgs
- 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 DnsRecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DnsRecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DnsRecordArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var dnsRecordResource = new Vercel.DnsRecord("dnsRecordResource", new()
{
Domain = "string",
Type = "string",
Comment = "string",
MxPriority = 0,
Name = "string",
Srv = new Vercel.Inputs.DnsRecordSrvArgs
{
Port = 0,
Priority = 0,
Target = "string",
Weight = 0,
},
TeamId = "string",
Ttl = 0,
Value = "string",
});
example, err := vercel.NewDnsRecord(ctx, "dnsRecordResource", &vercel.DnsRecordArgs{
Domain: pulumi.String("string"),
Type: pulumi.String("string"),
Comment: pulumi.String("string"),
MxPriority: pulumi.Int(0),
Name: pulumi.String("string"),
Srv: &vercel.DnsRecordSrvArgs{
Port: pulumi.Int(0),
Priority: pulumi.Int(0),
Target: pulumi.String("string"),
Weight: pulumi.Int(0),
},
TeamId: pulumi.String("string"),
Ttl: pulumi.Int(0),
Value: pulumi.String("string"),
})
var dnsRecordResource = new DnsRecord("dnsRecordResource", DnsRecordArgs.builder()
.domain("string")
.type("string")
.comment("string")
.mxPriority(0)
.name("string")
.srv(DnsRecordSrvArgs.builder()
.port(0)
.priority(0)
.target("string")
.weight(0)
.build())
.teamId("string")
.ttl(0)
.value("string")
.build());
dns_record_resource = vercel.DnsRecord("dnsRecordResource",
domain="string",
type="string",
comment="string",
mx_priority=0,
name="string",
srv={
"port": 0,
"priority": 0,
"target": "string",
"weight": 0,
},
team_id="string",
ttl=0,
value="string")
const dnsRecordResource = new vercel.DnsRecord("dnsRecordResource", {
domain: "string",
type: "string",
comment: "string",
mxPriority: 0,
name: "string",
srv: {
port: 0,
priority: 0,
target: "string",
weight: 0,
},
teamId: "string",
ttl: 0,
value: "string",
});
type: vercel:DnsRecord
properties:
comment: string
domain: string
mxPriority: 0
name: string
srv:
port: 0
priority: 0
target: string
weight: 0
teamId: string
ttl: 0
type: string
value: string
DnsRecord Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DnsRecord resource accepts the following input properties:
- Domain string
- The domain name, or zone, that the DNS record should be created beneath.
- Type string
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - Comment string
- A comment explaining what the DNS record is for.
- Mx
Priority int - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- Name string
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- Srv
Pulumiverse.
Vercel. Inputs. Dns Record Srv - Settings for an SRV record.
- Team
Id string - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- Ttl int
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- Value string
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
- Domain string
- The domain name, or zone, that the DNS record should be created beneath.
- Type string
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - Comment string
- A comment explaining what the DNS record is for.
- Mx
Priority int - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- Name string
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- Srv
Dns
Record Srv Args - Settings for an SRV record.
- Team
Id string - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- Ttl int
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- Value string
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
- domain String
- The domain name, or zone, that the DNS record should be created beneath.
- type String
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - comment String
- A comment explaining what the DNS record is for.
- mx
Priority Integer - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- name String
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- srv
Dns
Record Srv - Settings for an SRV record.
- team
Id String - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- ttl Integer
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- value String
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
- domain string
- The domain name, or zone, that the DNS record should be created beneath.
- type string
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - comment string
- A comment explaining what the DNS record is for.
- mx
Priority number - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- name string
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- srv
Dns
Record Srv - Settings for an SRV record.
- team
Id string - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- ttl number
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- value string
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
- domain str
- The domain name, or zone, that the DNS record should be created beneath.
- type str
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - comment str
- A comment explaining what the DNS record is for.
- mx_
priority int - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- name str
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- srv
Dns
Record Srv Args - Settings for an SRV record.
- team_
id str - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- ttl int
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- value str
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
- domain String
- The domain name, or zone, that the DNS record should be created beneath.
- type String
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - comment String
- A comment explaining what the DNS record is for.
- mx
Priority Number - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- name String
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- srv Property Map
- Settings for an SRV record.
- team
Id String - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- ttl Number
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- value String
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
Outputs
All input properties are implicitly available as output properties. Additionally, the DnsRecord 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 DnsRecord Resource
Get an existing DnsRecord 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?: DnsRecordState, opts?: CustomResourceOptions): DnsRecord
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
comment: Optional[str] = None,
domain: Optional[str] = None,
mx_priority: Optional[int] = None,
name: Optional[str] = None,
srv: Optional[DnsRecordSrvArgs] = None,
team_id: Optional[str] = None,
ttl: Optional[int] = None,
type: Optional[str] = None,
value: Optional[str] = None) -> DnsRecord
func GetDnsRecord(ctx *Context, name string, id IDInput, state *DnsRecordState, opts ...ResourceOption) (*DnsRecord, error)
public static DnsRecord Get(string name, Input<string> id, DnsRecordState? state, CustomResourceOptions? opts = null)
public static DnsRecord get(String name, Output<String> id, DnsRecordState state, CustomResourceOptions options)
resources: _: type: vercel:DnsRecord get: id: ${id}
- 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.
- Comment string
- A comment explaining what the DNS record is for.
- Domain string
- The domain name, or zone, that the DNS record should be created beneath.
- Mx
Priority int - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- Name string
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- Srv
Pulumiverse.
Vercel. Inputs. Dns Record Srv - Settings for an SRV record.
- Team
Id string - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- Ttl int
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- Type string
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - Value string
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
- Comment string
- A comment explaining what the DNS record is for.
- Domain string
- The domain name, or zone, that the DNS record should be created beneath.
- Mx
Priority int - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- Name string
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- Srv
Dns
Record Srv Args - Settings for an SRV record.
- Team
Id string - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- Ttl int
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- Type string
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - Value string
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
- comment String
- A comment explaining what the DNS record is for.
- domain String
- The domain name, or zone, that the DNS record should be created beneath.
- mx
Priority Integer - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- name String
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- srv
Dns
Record Srv - Settings for an SRV record.
- team
Id String - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- ttl Integer
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- type String
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - value String
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
- comment string
- A comment explaining what the DNS record is for.
- domain string
- The domain name, or zone, that the DNS record should be created beneath.
- mx
Priority number - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- name string
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- srv
Dns
Record Srv - Settings for an SRV record.
- team
Id string - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- ttl number
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- type string
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - value string
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
- comment str
- A comment explaining what the DNS record is for.
- domain str
- The domain name, or zone, that the DNS record should be created beneath.
- mx_
priority int - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- name str
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- srv
Dns
Record Srv Args - Settings for an SRV record.
- team_
id str - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- ttl int
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- type str
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - value str
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
- comment String
- A comment explaining what the DNS record is for.
- domain String
- The domain name, or zone, that the DNS record should be created beneath.
- mx
Priority Number - The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority.
- name String
- The subdomain name of the record. This should be an empty string if the rercord is for the root domain.
- srv Property Map
- Settings for an SRV record.
- team
Id String - The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.
- ttl Number
- The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds.
- type String
- The type of DNS record. Available types:
A
,AAAA
,ALIAS
,CAA
,CNAME
,MX
,NS
,SRV
,TXT
. - value String
- The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. For an 'AAAA' record, this should be an IPv6 address. For 'ALIAS' records, this should be a hostname. For 'CAA' records, this should specify specify which Certificate Authorities (CAs) are allowed to issue certificates for the domain. For 'CNAME' records, this should be a different domain name. For 'MX' records, this should specify the mail server responsible for accepting messages on behalf of the domain name. For 'TXT' records, this can contain arbitrary text.
Supporting Types
DnsRecordSrv, DnsRecordSrvArgs
- Port int
- The TCP or UDP port on which the service is to be found.
- Priority int
- The priority of the target host, lower value means more preferred.
- Target string
- The canonical hostname of the machine providing the service, ending in a dot.
- Weight int
- A relative weight for records with the same priority, higher value means higher chance of getting picked.
- Port int
- The TCP or UDP port on which the service is to be found.
- Priority int
- The priority of the target host, lower value means more preferred.
- Target string
- The canonical hostname of the machine providing the service, ending in a dot.
- Weight int
- A relative weight for records with the same priority, higher value means higher chance of getting picked.
- port Integer
- The TCP or UDP port on which the service is to be found.
- priority Integer
- The priority of the target host, lower value means more preferred.
- target String
- The canonical hostname of the machine providing the service, ending in a dot.
- weight Integer
- A relative weight for records with the same priority, higher value means higher chance of getting picked.
- port number
- The TCP or UDP port on which the service is to be found.
- priority number
- The priority of the target host, lower value means more preferred.
- target string
- The canonical hostname of the machine providing the service, ending in a dot.
- weight number
- A relative weight for records with the same priority, higher value means higher chance of getting picked.
- port int
- The TCP or UDP port on which the service is to be found.
- priority int
- The priority of the target host, lower value means more preferred.
- target str
- The canonical hostname of the machine providing the service, ending in a dot.
- weight int
- A relative weight for records with the same priority, higher value means higher chance of getting picked.
- port Number
- The TCP or UDP port on which the service is to be found.
- priority Number
- The priority of the target host, lower value means more preferred.
- target String
- The canonical hostname of the machine providing the service, ending in a dot.
- weight Number
- A relative weight for records with the same priority, higher value means higher chance of getting picked.
Package Details
- Repository
- vercel pulumiverse/pulumi-vercel
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vercel
Terraform Provider.