Skip to main content

zone_dyn_host_records

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

Overview​

Namezone_dyn_host_records
TypeResource
Idovh.domain.zone_dyn_host_records

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerRecord ID
ipstring (ipv4)Record IP (example: 192.0.2.0)
sub_domainstringRecord sub-domain (wire: subDomain)
ttlintegerRecord TTL (Time to Live)
zonestringRecord zone

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, zone_nameReturns a DynHost record: subdomain, IP and TTL.
listselectzone_namesub_domain, x_pagination_modeReturns the identifiers of the DynHost records of the zone. Can be filtered by subdomain.
createinsertzone_nameCreates a DynHost record with a subdomain, an IP and a TTL.
updateupdateid, zone_nameUpdates the IP and TTL of a DynHost record.
deletedeleteid, zone_nameDeletes a DynHost record.

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
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
idintegerId
zone_namestringZone name (wire: zoneName)
sub_domainstringFilter the value of subDomain property (ilike) (wire: subDomain)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Returns a DynHost record: subdomain, IP and TTL.

SELECT
id,
ip,
sub_domain,
ttl,
zone
FROM ovh.domain.zone_dyn_host_records
WHERE id = '{{ id }}' -- required
AND zone_name = '{{ zone_name }}' -- required
;

INSERT examples​

Creates a DynHost record with a subdomain, an IP and a TTL.

INSERT INTO ovh.domain.zone_dyn_host_records (
ip,
sub_domain,
zone_name
)
SELECT
'{{ ip }}',
'{{ sub_domain }}',
'{{ zone_name }}'
RETURNING
id,
ip,
sub_domain,
ttl,
zone
;

UPDATE examples​

Updates the IP and TTL of a DynHost record.

UPDATE ovh.domain.zone_dyn_host_records
SET
ip = '{{ ip }}',
sub_domain = '{{ sub_domain }}'
WHERE
id = '{{ id }}' --required
AND zone_name = '{{ zone_name }}' --required;

DELETE examples​

Deletes a DynHost record.

DELETE FROM ovh.domain.zone_dyn_host_records
WHERE id = '{{ id }}' --required
AND zone_name = '{{ zone_name }}' --required
;