zone_dyn_host_records
Creates, updates, deletes, gets or lists a zone_dyn_host_records resource.
Overview​
| Name | zone_dyn_host_records |
| Type | Resource |
| Id | ovh.domain.zone_dyn_host_records |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Record ID |
ip | string (ipv4) | Record IP (example: 192.0.2.0) |
sub_domain | string | Record sub-domain (wire: subDomain) |
ttl | integer | Record TTL (Time to Live) |
zone | string | Record zone |
DNS zone dynHost record
| Name | Datatype | Description |
|---|---|---|
id | integer | Record ID |
ip | string (ipv4) | Record IP (example: 192.0.2.0) |
sub_domain | string | Record sub-domain (wire: subDomain) |
ttl | integer | Record TTL (Time to Live) |
zone | string | Record zone |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, zone_name | Returns a DynHost record: subdomain, IP and TTL. | |
list | select | zone_name | sub_domain, x_pagination_mode | Returns the identifiers of the DynHost records of the zone. Can be filtered by subdomain. |
create | insert | zone_name | Creates a DynHost record with a subdomain, an IP and a TTL. | |
update | update | id, zone_name | Updates the IP and TTL of a DynHost record. | |
delete | delete | id, zone_name | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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"}}) |
id | integer | Id |
zone_name | string | Zone name (wire: zoneName) |
sub_domain | string | Filter the value of subDomain property (ilike) (wire: subDomain) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
Returns the identifiers of the DynHost records of the zone. Can be filtered by subdomain.
SELECT
id,
ip,
sub_domain,
ttl,
zone
FROM ovh.domain.zone_dyn_host_records
WHERE zone_name = '{{ zone_name }}' -- required
AND sub_domain = '{{ sub_domain }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: zone_dyn_host_records
props:
- name: zone_name
value: "{{ zone_name }}"
description: Required parameter for the zone_dyn_host_records resource.
- name: ip
value: "{{ ip }}"
description: |
Record IP
- name: sub_domain
value: "{{ sub_domain }}"
description: |
Record sub-domain
UPDATE examples​
- update
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​
- delete
Deletes a DynHost record.
DELETE FROM ovh.domain.zone_dyn_host_records
WHERE id = '{{ id }}' --required
AND zone_name = '{{ zone_name }}' --required
;