domains_records
Creates, updates, deletes, gets or lists a domains_records
resource.
Overview
Name | domains_records |
Type | Resource |
Id | vercel.dns.domains_records |
Fields
The following fields are returned by SELECT
queries:
- get_records
Successful response retrieving a list of paginated DNS records.
Name | Datatype | Description |
---|
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_records | select | domain , teamId | limit , since , until | 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. |
create_record | insert | domain , teamId , data__type , data__value , data__name | Creates a DNS record for a domain. | |
remove_record | delete | domain , recordId , teamId | Removes an existing DNS record from a domain name. | |
_get_records | exec | domain , teamId | limit , since , until | 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. |
update_record | exec | recordId , teamId | Updates 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.
Name | Datatype | Description |
---|---|---|
domain | string | |
recordId | string | The id of the DNS record |
teamId | string | The Team identifier or slug to perform the request on behalf of. |
limit | string | Maximum number of records to list from a request. |
since | string | Get records created after this JavaScript timestamp. |
until | string | Get records created before this JavaScript timestamp. |
SELECT
examples
- get_records
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
- create_record
- Manifest
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 }}'
;
# Description fields are for documentation purposes
- name: domains_records
props:
- name: domain
value: string
description: Required parameter for the domains_records resource.
- name: teamId
value: string
description: Required parameter for the domains_records resource.
- name: name
value: string
description: |
A subdomain name or an empty string for the root domain.
- name: type
value: string
description: |
Must be of type `A`.
valid_values: ['A']
- name: ttl
value: number
description: |
The TTL value. Must be a number between 60 and 2147483647. Default value is 60.
- name: value
value: string
description: |
The record value must be a valid IPv4 address.
- name: comment
value: string
description: |
A comment to add context on what this DNS record is for
DELETE
examples
- remove_record
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
- _get_records
- update_record
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 }}'
;
Updates an existing DNS record for a domain name.
EXEC vercel.dns.domains_records.update_record
@recordId='{{ recordId }}' --required,
@teamId='{{ teamId }}' --required
@@json=
'{
"name": "{{ name }}",
"value": "{{ value }}",
"type": "{{ type }}",
"ttl": {{ ttl }},
"mxPriority": {{ mxPriority }},
"srv": "{{ srv }}",
"comment": "{{ comment }}"
}'
;