zone_histories
Creates, updates, deletes, gets or lists a zone_histories resource.
Overview​
| Name | zone_histories |
| Type | Resource |
| Id | ovh.domain.zone_histories |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
creation_date | string (date-time) | The date of backup creation (wire: creationDate) |
zone_file_url | string | The URL of the saved zone at this date (wire: zoneFileUrl) |
DNS zone history
| Name | Datatype | Description |
|---|---|---|
creation_date | string (date-time) | The date of backup creation (wire: creationDate) |
zone_file_url | string | The URL of the saved zone at this date (wire: zoneFileUrl) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | creation_date, zone_name | Returns a restore point: its creation date and the URL of the saved zone file. | |
list | select | zone_name | creation_date.from, creation_date.to, x_pagination_mode | Returns the creation dates of the zone restore points. Can be filtered by a creation date range. |
restore | exec | creationDate, zoneName | Restores the zone to the selected restore point and returns the task. |
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"}}) |
creationDate | string (date-time) | Creation date |
creation_date | string (date-time) | Creation date (wire: creationDate) |
zoneName | string | Zone name |
zone_name | string | Zone name (wire: zoneName) |
creation_date.from | string (date-time) | Filter using the value of creationDate property (>=) (wire: creationDate.from) |
creation_date.to | string (date-time) | Filter using the value of creationDate property (<=) (wire: creationDate.to) |
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 restore point: its creation date and the URL of the saved zone file.
SELECT
creation_date,
zone_file_url
FROM ovh.domain.zone_histories
WHERE creation_date = '{{ creation_date }}' -- required
AND zone_name = '{{ zone_name }}' -- required
;
Returns the creation dates of the zone restore points. Can be filtered by a creation date range.
SELECT
creation_date,
zone_file_url
FROM ovh.domain.zone_histories
WHERE zone_name = '{{ zone_name }}' -- required
AND creation_date.from = '{{ creation_date.from }}'
AND creation_date.to = '{{ creation_date.to }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- restore
Restores the zone to the selected restore point and returns the task.
EXEC ovh.domain.zone_histories.restore
@creationDate='{{ creationDate }}' --required,
@zoneName='{{ zoneName }}' --required
;