Skip to main content

domain_records

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

Overview​

Namedomain_records
TypeResource
Idoci.dns.domain_records

Fields​

The following fields are returned by SELECT queries:

A collection of DNS resource record objects.

NameDatatypeDescription
itemsarray

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectzoneNameOrId, domain, regionIf-None-Match, If-Modified-Since, opc-request-id, limit, page, zoneVersion, rtype, scope, viewId, sortBy, sortOrder, compartmentIdGets a list of all records at the specified zone and domain.<br /><br />The results are sorted by rtype in alphabetical order by default. You can optionally filter and/or sort<br />the results using the listed parameters. When the zone name is provided as a path parameter and PRIVATE<br />is used for the scope query parameter then the viewId query parameter is required.<br />
updateupdatezoneNameOrId, domain, regionIf-Match, If-Unmodified-Since, opc-request-id, scope, viewId, compartmentIdReplaces records in the specified zone at a domain with the records specified in the request body.<br /><br />If a specified record does not exist, it will be created. If the record exists, then it will be updated to<br />represent the record in the body of the request. If a record in the zone does not exist in the request body,<br />the record will be removed from the zone. When the zone name is provided as a path parameter and PRIVATE<br />is used for the scope query parameter then the viewId query parameter is required.<br />
deletedeletezoneNameOrId, domain, regionIf-Match, If-Unmodified-Since, opc-request-id, scope, viewId, compartmentIdDeletes all records at the specified zone and domain.<br /><br />When the zone name is provided as a path parameter and PRIVATE is used for the scope query parameter<br />then the viewId query parameter is required.<br />

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
domainstringThe target fully-qualified domain name (FQDN) within the target zone.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
zoneNameOrIdstringThe name or OCID of the target zone.
If-MatchstringThe If-Match header field makes the request method conditional on the existence of at least one current representation of the target resource, when the field-value is *, or having a current representation of the target resource that has an entity-tag matching a member of the list of entity-tags provided in the field-value.
If-Modified-SincestringThe If-Modified-Since header field makes a GET or HEAD request method conditional on the selected representation's modification date being more recent than the date provided in the field-value. Transfer of the selected representation's data is avoided if that data has not changed.
If-None-MatchstringThe If-None-Match header field makes the request method conditional on the absence of any current representation of the target resource, when the field-value is *, or having a selected representation with an entity-tag that does not match any of those listed in the field-value.
If-Unmodified-SincestringThe If-Unmodified-Since header field makes the request method conditional on the selected representation's last modification date being earlier than or equal to the date provided in the field-value. This field accomplishes the same purpose as If-Match for cases where the user agent does not have an entity-tag for the representation.
compartmentIdstringThe OCID of the compartment the zone belongs to. This parameter is deprecated and should be omitted.
limitinteger (int64)The maximum number of items to return in a page of the collection.
opc-request-idstringUnique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
pagestringThe value of the opc-next-page response header from the previous "List" call.
rtypestringSearch by record type. Will match any record whose [type](https:​//www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4) (case-insensitive) equals the provided value.
scopestringSpecifies to operate only on resources that have a matching DNS scope.
sortBystringThe field by which to sort records.
sortOrderstringThe order to sort the resources.
viewIdstringThe OCID of the view the zone is associated with. Required when accessing a private zone by name.
zoneVersionstringThe version of the zone for which data is requested.

SELECT examples​

Gets a list of all records at the specified zone and domain.<br /><br />The results are sorted by rtype in alphabetical order by default. You can optionally filter and/or sort<br />the results using the listed parameters. When the zone name is provided as a path parameter and PRIVATE<br />is used for the scope query parameter then the viewId query parameter is required.<br />

SELECT
items
FROM oci.dns.domain_records
WHERE zoneNameOrId = '{{ zoneNameOrId }}' -- required
AND domain = '{{ domain }}' -- required
AND region = '{{ region }}' -- required
AND If-None-Match = '{{ If-None-Match }}'
AND If-Modified-Since = '{{ If-Modified-Since }}'
AND opc-request-id = '{{ opc-request-id }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND zoneVersion = '{{ zoneVersion }}'
AND rtype = '{{ rtype }}'
AND scope = '{{ scope }}'
AND viewId = '{{ viewId }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND compartmentId = '{{ compartmentId }}'
;

UPDATE examples​

Replaces records in the specified zone at a domain with the records specified in the request body.<br /><br />If a specified record does not exist, it will be created. If the record exists, then it will be updated to<br />represent the record in the body of the request. If a record in the zone does not exist in the request body,<br />the record will be removed from the zone. When the zone name is provided as a path parameter and PRIVATE<br />is used for the scope query parameter then the viewId query parameter is required.<br />

UPDATE oci.dns.domain_records
SET
items = '{{ items }}'
WHERE
zoneNameOrId = '{{ zoneNameOrId }}' --required
AND domain = '{{ domain }}' --required
AND region = '{{ region }}' --required
AND If-Match = '{{ If-Match}}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since}}'
AND opc-request-id = '{{ opc-request-id}}'
AND scope = '{{ scope}}'
AND viewId = '{{ viewId}}'
AND compartmentId = '{{ compartmentId}}'
RETURNING
items;

DELETE examples​

Deletes all records at the specified zone and domain.<br /><br />When the zone name is provided as a path parameter and PRIVATE is used for the scope query parameter<br />then the viewId query parameter is required.<br />

DELETE FROM oci.dns.domain_records
WHERE zoneNameOrId = '{{ zoneNameOrId }}' --required
AND domain = '{{ domain }}' --required
AND region = '{{ region }}' --required
AND If-Match = '{{ If-Match }}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since }}'
AND opc-request-id = '{{ opc-request-id }}'
AND scope = '{{ scope }}'
AND viewId = '{{ viewId }}'
AND compartmentId = '{{ compartmentId }}'
;