Skip to main content

domains_records

Creates, updates, deletes, gets or lists a domains_records resource.

Overview

Namedomains_records
TypeResource
Idvercel.dns.domains_records

Fields

The following fields are returned by SELECT queries:

Successful response retrieving a list of paginated DNS records.

NameDatatypeDescription

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_recordsselectdomain, teamIdlimit, since, untilRetrieves a list of DNS records created for a domain name. By default it returns 20 records if no limit is provided. The rest can be retrieved using the pagination options.
create_recordinsertdomain, teamId, data__type, data__value, data__nameCreates a DNS record for a domain.
remove_recorddeletedomain, recordId, teamIdRemoves an existing DNS record from a domain name.
_get_recordsexecdomain, teamIdlimit, since, untilRetrieves a list of DNS records created for a domain name. By default it returns 20 records if no limit is provided. The rest can be retrieved using the pagination options.
update_recordexecrecordId, teamIdUpdates an existing DNS record for a domain name.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domainstring
recordIdstringThe id of the DNS record
teamIdstringThe Team identifier or slug to perform the request on behalf of.
limitstringMaximum number of records to list from a request.
sincestringGet records created after this JavaScript timestamp.
untilstringGet records created before this JavaScript timestamp.

SELECT examples

Retrieves a list of DNS records created for a domain name. By default it returns 20 records if no limit is provided. The rest can be retrieved using the pagination options.

SELECT
*
FROM vercel.dns.domains_records
WHERE domain = '{{ domain }}' -- required
AND teamId = '{{ teamId }}' -- required
AND limit = '{{ limit }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
;

INSERT examples

Creates a DNS record for a domain.

INSERT INTO vercel.dns.domains_records (
data__name,
data__type,
data__ttl,
data__value,
data__comment,
domain,
teamId
)
SELECT
'{{ name }}' /* required */,
'{{ type }}' /* required */,
{{ ttl }},
'{{ value }}' /* required */,
'{{ comment }}',
'{{ domain }}',
'{{ teamId }}'
;

DELETE examples

Removes an existing DNS record from a domain name.

DELETE FROM vercel.dns.domains_records
WHERE domain = '{{ domain }}' --required
AND recordId = '{{ recordId }}' --required
AND teamId = '{{ teamId }}' --required
;

Lifecycle Methods

Retrieves a list of DNS records created for a domain name. By default it returns 20 records if no limit is provided. The rest can be retrieved using the pagination options.

EXEC vercel.dns.domains_records._get_records 
@domain='{{ domain }}' --required,
@teamId='{{ teamId }}' --required,
@limit='{{ limit }}',
@since='{{ since }}',
@until='{{ until }}'
;